alexschimpf / snkrs-bot Goto Github PK
View Code? Open in Web Editor NEWSelenium bot for Nike Snkrs site
License: The Unlicense
Selenium bot for Nike Snkrs site
License: The Unlicense
bash: my shoe url : File or directory does not exist
is there any solution?
could someone make a vid of this in action? like I run it but just tells me no file found for whatever url im running any help would be greatly appreciated
2019-02-12 22:08:32,450 [PID 6067] [Thread 140736427754432] [INFO] [root] Waiting for login button to become clickable
It stuck at this place.
Can you give me any hint for this issue?
The script I am using is
python main.py --username 'username' --password 'password' --url 'https://www.nike.com/launch/t/XXXXX' --shoe-size 36.5 --driver-type 'firefox'
Thanks!
python main.py --username 'username' --password 'password' --url 'https://www.nike.com/launch/t/air-jordan-1-high-fearless/' --shoe-size 9.5 --release-time '11/2/2019' --driver-type 'chrome' --headless --num-retries 100
2019-10-31 06:59:05,821 [PID 1237] [Thread 4722918848] [INFO] [root] Requesting page: https://www.nike.com/us/en_us/
2019-10-31 06:59:07,824 [PID 1237] [Thread 4722918848] [INFO] [root] Page load timed out but continuing anyway
2019-10-31 06:59:07,824 [PID 1237] [Thread 4722918848] [INFO] [root] Waiting for login button to become clickable
Hi,
I'm very curious about the Nike Store API that you are using in the experimental script. Is it documented anywhere (unofficially)? Where did you get your informations from?
Thanks!
Traceback (most recent call last):
File "main.py", line 78, in run
click_buy_button(driver=driver)
File "main.py", line 169, in click_buy_button
wait_until_clickable(driver, xpath=xpath, duration=10)
File "main.py", line 207, in wait_until_clickable
WebDriverWait(driver, duration, frequency).until(EC.element_to_be_clickable((By.XPATH, xpath)))
File "/Users/shaodong/www/Snkrs-Bot/venv/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message:
When I logged in to the Nike website, the action stopped. And warning said: from origin 'https://www.nike.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Hi !
I want to try and customize this script to work for Israel to.
Could you point on where to start ?
First day in attempting to create such purchase automation in python
I don't know if someone still working at this script, but I really need help.
I basically rewrote all the code to the actual Nike website for my country (BR); However, I'm having trouble to select the "Terms and conditions" checkbox at the checkout page.
Any help will be of great value
OS:Linux MInt
VSCode
Python3.8
Is there anyone can tell me is this still working??
Does this create spam accounts that will increase you chances in getting the sneaker, or is it just a faster method in purchasing. I want to make multiple spam accounts in order to create my chances , does this bot do that in the code?
When I run the script and input some parameters to it,like USERNAME PASSWORD URL and SHOT_SIZE,it only will output error,like this(cmd):
C:\Users\Berli\AppData\Local\Programs\Python\Python37\Scripts>main.py --username ********* --password ********* --url https://www.nike.com/cn/launch/t/m2k-tekno-pure-platinum-sail-black/ --shoe-size 42 --driver-type chrome
usage: main.py [-h] --username USERNAME --password PASSWORD --url URL
--shoe-size SHOE_SIZE [--login-time LOGIN_TIME]
[--release-time RELEASE_TIME]
[--screenshot-path SCREENSHOT_PATH]
[--page-load-timeout PAGE_LOAD_TIMEOUT]
[--driver-type {firefox,chrome}] [--headless]
[--select-payment] [--purchase] [--num-retries NUM_RETRIES]
main.py: error: the following arguments are required: --username, --password, --url, --shoe-size
I don't know how to input,please give me some advice.Thank you so much!!!
Can someone tell me is this bot really work or not
Hi,
Thank you so much for this great tool. everything is working for me except that the bot gets stuck at the payment step.
I have my paypal account saved in my nike account and it is automatically selected at checkout.
However the bot fails to click the "save & continue" button then submit order. how can i fix that?
I tried my command with and without --select-payment and/or --purchase
Thanks
Hi all,
I apologize I am very new to this and spent a couple hours this morning trying to figure this out myself but not moving very far very fast. I have installed all the requirements and I feel like I have been pretty thorough but this is the error that I keep getting. Can someone help me out.
Cheers!
python3 main.py --username ******************** --password ********** --url https://www.nike.com/launch/t/jordan-why-not-zer04-upbringing --shoe-size 12.5 --shoe-type M --driver-type firefox --cvv **** --shipping-option STANDARD --shipping-address '{"first_name":"", "last_name":"", "address":"", "apt":"", "city":"****", "state":"", "zip_code":"", "phone_number":""}' --page-load-timeout 3 --headless --purchase --dont-quit
/Users/code/main.py:644: DeprecationWarning: use service_log_path instead of log_path
driver = webdriver.Firefox(executable_path=executable_path, firefox_options=options, log_path=os.devnull)
/Users/code/main.py:644: DeprecationWarning: use options instead of firefox_options
driver = webdriver.Firefox(executable_path=executable_path, firefox_options=options, log_path=os.devnull)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1819, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './bin/geckodriver_mac'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/code/main.py", line 644, in
driver = webdriver.Firefox(executable_path=executable_path, firefox_options=options, log_path=os.devnull)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in init
self.service.start()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver_mac' executable needs to be in PATH.'
The website says not secure and that the connection is not private. It states that attackers may be trying to steal my information. Though I know this isnt true I have not found a way to get past it. Can provide more information if asked.
I try to fill CVC payment page, but i stuck at some point
driver.execute_cdp_cmd("Page.setBypassCSP", {"enabled": True}) # to disable Contect Security Policy
The devicemotion events are blocked by feature policy. See https://github.com/WICG/feature-policy/blob/master/features.md#sensor-features
I stuck at this point, Do you handle it in your script? If you do how?Im just running
python3 main.py
to see if it compiles and I get the error message:
Traceback (most recent call last):
File "main.py", line 4, in <module>
import pause
ModuleNotFoundError: No module named 'pause'
Any reason why pause wouldn't work?
Update to Python version 3 please, Python version 2 is no longer active
hey.
I am trying to install thru requirements.txt file ,and by myself thru pip install and it doesnt work.
even after I delete python completly from my computer.
Please help me :D.
I am very confused on where to begin! I have downloaded python 3.7 on MacOS 10.4.6 and I am not getting any further. I would really appreciate some assistance! Thank you
It does everything up to enter cvv not sure why I put --cvv ___
hello! can you please explain how to install selenium driver in you script? thank you!
Hi, i quite new and a bit of a amateur, i am unsure how to install six and have tried lots and done lots of research to no avail
Any help would be appreciated :)
Good afternoon! I'm having trouble using the bot, I have no experience in handling this advanced programming.
I don't know where in the code I add the information like: tennis link, tennis size, my login and my credit card. I also don't know how to run / activate the bot ... If you can explain to me how the bot works I appreciate it!
Hello! I was wondering if anyone has run into the issue of validating a phone number after adding to cart - not sure if was a one time thing or I have to account for it every time now. Thanks!
how do i install the bot on my computer because i can't follow this step by step
I could better explain here what programs I have to have and etc.
Saw this issue this morning with Adapt BB 2 Mag release:
Failed to click buy button: Message: Element could not be scrolled into view
Traceback (most recent call last):
File "main.py", line 97, in run
click_buy_button(driver=driver)
File "main.py", line 250, in click_buy_button
driver.find_element_by_xpath(xpath).click()
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: Element could not be scrolled into view
After a couple of retries, the buy button does scroll into view and eventually get clicked. I've seen this issue on In Stock shoes (in my testing I switch the xpath to "@Data-QA='add-to-cart'" instead of "@Data-QA='feed-buy-cta"). I've seen the following suggested online to get button into view, but doesn't work for me:
def click_buy_button(driver):
xpath = "//button[@data-qa='feed-buy-cta']"
LOGGER.info("Waiting for buy button to become clickable")
wait_until_clickable(driver, xpath=xpath, duration=10)
**element = driver.find_element_by_xpath(xpath)
driver.execute_script("arguments[0].scrollIntoView(true);" + "window.scrollBy(0,-100);", element)**
LOGGER.info("Clicking buy button")
driver.find_element_by_xpath(xpath).click()
Not sure how to solve this to guarantee button scrolls into view.
Nothing really shows up on chrome after the bot ran. What should i do?
This is a newbie question but thanks to everyone who worked on this.
Waiting for size dropdown to appear
Hey, I was wondering if I could get some help with this. When I run the program I get this error:
Traceback (most recent call last): File "main.py", line 253, in <module> raise Exception("Unsupported operating system. Please add your own Selenium driver for it.") Exception: Unsupported operating system. Please add your own Selenium driver for it.
Please help as I only have a couple days until the sneakers I'm trying to get release.
Since snkrs uses the LEO or DAN systems to drop shoes, what is the purpose of this bot? Even if it helps in executing faster some actions, actually having the possibility to buy the shoes is left to the draft system so this is completely useless? Or is there something that I am missing?
Bot doesn't login. I receive this error on the nike site:
"AN ERROR OCCURRED.
We are unable to connect to the servers right now. Please try again later.
Dismiss this error"
Windows 10pro
Waiting for buy button to become present!!!!!!!
With saved payment, does the bot accommodate for having to reenter the CVV of your credit card? I noticed on Nike's website when your purchasing an item with saved payment you have to retype your CVV
The bot will navigate to nike login. If it gets the error, it dismisses it and then logs in. And then it just sits at the nike main page.
How can I add the information? Ex. --username
Will the bot work in several windows of browser in same time?
Not sure if I am missing something in particular but the bot stopped/failed on "Submit Order" - I am using firefox.
This error message might of help:
2021-01-08 07:01:03,013 [PID 22807] [Thread 4636188096] [ERROR] [root] Failed visibility check for Submit Button: Message:
Traceback (most recent call last):
File "/Users/Snkrs-Bot/main.py", line 527, in poll_checkout_phase_one
check_submit_button(driver=driver, xpath_o=xpath)
File "/Users/Snkrs-Bot/main.py", line 474, in check_submit_button
wait_until_clickable(driver, xpath=xpath, duration=.2)
File "/Users/Snkrs-Bot/main.py", line 580, in wait_until_clickable
WebDriverWait(driver, duration, frequency).until(EC.element_to_be_clickable((By.XPATH, xpath)))
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
2021-01-08 07:01:03,014 [PID 22807] [Thread 4636188096] [INFO] [root] Too many iterations through checkout element check. Terminating check...
2021-01-08 07:01:03,014 [PID 22807] [Thread 4636188096] [INFO] [root] Purchase failed
Now that I read back on it, it seems to have failed visibility checks for Address, Shipping and payment as well but those seem to have gone through since it just failed at Submit Order. I pulled in the latest changes and would love any advice on how to fix this! (I am completely new at python)
Is there any way to modify this to enter multiple accounts within a SNKRS Raffle?
if login in the website home url, then try to switch the launch page for purchasing the limited sneaker, the account state still logout, so I think do the login action the launch url. Right ?
Need Help for SNKRS MY :( anyone?
Hi ..
firstly thanks for the good work here.
However, I run into a problem - login + pw are working fine, but the part to open the requested URL --url does not work. Any idea (i.e. sample URL) or how can I trace/log it?
Thanks in advance
BR
J
Yo, so could you maybe help me adapt this to the swiss snkrs website? I have discord, so you can message me over that. DeNnIs#5989
I don't understand what the datetime format actually is? For me it always outputs a ValueError: Day is out of range for month when I put for example 2020,11,12,5,20,30 and i've tried many many different formats and i'm still unable to get it to work without error? Could you please further explain how the datetime format works? i've spent hours trying to research this and nothing seems to work?
Would you consider adding a license to this project, such as MIT or whatever you like?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.