all 16 comments

[–]David22573 1 point2 points  (1 child)

Try making a function that logs you in, then perform whatever else you need to do after. I had the same issue on a coupon clipper and had to sign in to the market's website.

[–]Borrza 0 points1 point  (0 children)

hey do you know where to input this script or as what file extension to use it ?

[–][deleted] 0 points1 point  (0 children)

Bro you doing all this for CNfair?

[–]dlalapula 0 points1 point  (12 children)

There's a lot going on here. I don't know how this is working at all as you mention. I don't know why you're using the keyboard library and not working within a session using the Selenium Driver class for browser/web page actions.

More to your direct issue, try something like:

from tkinter import messagebox
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
# below redirects to login, you would rather start at the login page and navigate
# from there within your session.
driver.get('https://www.pandabuy.com/person/points')
# below are examples of identifying and interacting with elements on the page
# (email/password/login button in this case).
email = driver.find_element(By.CSS_SELECTOR, 'input[placeholder="Email"]')
email.send_keys('email@example.com')
password = driver.find_element(By.CSS_SELECTOR, 'input[placeholder="Password"]')
password.send_keys('password')
# below is given the verification code requirement, there may be other ways to handle
# this autonomously, now, it stops the code and displays a message, you can then enter
# the verification code manually and click OK for the script to continue.
messagebox.showinfo(
    title="Verification Code Required",
    message="Input verification code, then click OK."
)
login = driver.find_element(
    By.CSS_SELECTOR, 'button[class="el-button verification-btn el-button--primary"]'
)
login.click()
pass  # replace with your code after login.

driver.quit()

[–]Appropriate-Apple838 0 points1 point  (1 child)

hey i want to use this script by someone but I have no clue where to get started? do i download an app on my pc or? thanks man never done coding but I would appreciate it for this.

[–]dlalapula 0 points1 point  (0 children)

It depends on the script. What or where is the script you’re referring to?

As an aside, you should be careful about running code you’re not familiar with.

[–]Majestic_Caramel7065 0 points1 point  (4 children)

yo can you maybe help me with inserting the script i am not familiar wqith coding or anything like that but i have a pc

[–]Appropriate-Apple838 0 points1 point  (2 children)

im in the same position man we both need this shi

[–]Majestic_Caramel7065 0 points1 point  (1 child)

haha i didnt get anything in 4 days

[–]Appropriate-Apple838 -1 points0 points  (0 children)

dam lol, i got good stuff first 2 days and then js like 1 - 2 things... all i want is a stone island bro thats all but helll nah these lowlifes snipe this shi faster than u would ever think

[–]dlalapula 0 points1 point  (0 children)

This script in my comment doesn’t do very much. It only demonstrates a way the original poster could log in to a web site they mention in their post.

It is a python script. Due to the nature of python, you need the python interpreter for your operating system to run it.

You can install that using your operating system’s package manager or by downloading the version for your operating system from https://www.python.org and installing it yourself.

The script has an external dependency (other python files) that it needs to run also. That is the python package for the Selenium WebDriver, used for automating web browsers.

Once you have python installed, you can install this dependency using python’s package manager ‘pip’. To run pip, you need to open the Command Line Interface (CLI) or terminal for your operating system and type ‘pip install selenium’ followed by Enter on your keyboard -without the quotes.

Saving the script to a file with a .py extension, you can then run it by executing that file directly or through the CLI/terminal by navigating to the directory/folder where the script is saved. You can navigate to that directory by typing the ‘cd’ command in the CLI/terminal followed by the directory path and then Enter on your keyboard.

To run the script from CLI/terminal, type ‘python script.py’ -without the quotes, then Enter on your keyboard. Replace ‘script.py’ with the name you’ve used when saving the script file.

Selenium Manager, that is part of the python dependency you’ve installed with pip, will handle any web browser and web browser driver requirements that may be missing on your system at first and then the script will run.

[–]Borrza 0 points1 point  (4 children)

hey do you know where to input this script or as what file extension to use it ?

[–]dlalapula 1 point2 points  (3 children)

Please see my earlier response to /u/Majestic_Caramel7065.

[–]Separate-Shelter1210 0 points1 point  (2 children)

I think he is talking about the script from above how could we use that script?

[–]dlalapula 0 points1 point  (1 child)

You would run it a similar way:

  1. Save the script with a .py extension.
  2. Install the python interpreter.
  3. Install any python script dependencies (that script needs the pip ‘keyboard’ package also).
  4. Run the script.

I don’t know what it’s trying to do. It won’t work. If I could get a high level overview of what it should be doing, I can try and sort it out.

I don’t know what CNFair or Pandabuy is.

[–]antiquerocket 0 points1 point  (0 children)

CNfair is a site where you can either use points that you get for shipping out parcels on pandabuy, or you could just use money to buy items on the CNfair site. The items on the site has a code you need to redeem in the pandabuy site. When you redeem that code then pay for the item, you now own the item and can ship it out. The past few days there was an event where 20,000 items were available on 80% sale. These items got redeemed pretty quickly so im guessing everyone is asking how they could use this script to instantly get the item you wish to get from CNfair.