Closed amohap2 closed 4 years ago
yeah i did. page_source.zip
pushed the latest changes. Thank you for this.
I don't think the issue was resolved.
refreshed
refreshed
refreshed
SLOTS OPEN!
Found a slot but it got taken, run script again.
Traceback (most recent call last):
File "whole_foods_delivery_autobuy.py", line 135, in
ah dang! my bad. Added the proper check. thank you.
Not fixed yet. I think.
SLOTS OPEN!
Found a slot but it got taken, run script again.
Traceback (most recent call last):
File "whole_foods_delivery_autobuy.py", line 141, in
you should check for url change because as it refreshes you could get redirected to amazon.com/gp/buy/itemselect/...
no not really. I increased the wait times. I dont see this issue on my end.
I'll try to replicate and post the video
The script reaches SLOTS OPEN and then hits an exception when it reaches this page, which is very common. When an item(s) goes out of stock and amazon pulls the item from the cart:
SLOTS OPEN! Found a slot but it got taken, run script again. Traceback (most recent call last): File "whole_foods_delivery_autobuy.py", line 130, in
getWFSlot('https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1')
File "whole_foods_delivery_autobuy.py", line 127, in getWFSlot
autoCheckout(driver)
File "whole_foods_delivery_autobuy.py", line 33, in autoCheckout
slot_continue_button = driver.find_element_by_xpath('/html/body/div[5]/div[1]/div/div[2]/div/div/div/div/div[2]/div[3]/div/span/span/span/input')
File "/Users/amol/.pyenv/versions/2.7.16/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Users/amol/.pyenv/versions/2.7.16/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/Users/amol/.pyenv/versions/2.7.16/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Users/amol/.pyenv/versions/2.7.16/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[5]/div[1]/div/div[2]/div/div/div/div/div[2]/div[3]/div/span/span/span/input"}
(Session info: chrome=81.0.4044.113)
https://puu.sh/FAzq4/e184453bce.png