Giter Club home page Giter Club logo

Comments (15)

mattmeng87 avatar mattmeng87 commented on August 25, 2024

I also had this problem. I'll save if it fails too.

from whole-foods-delivery-slot.

pcomputo avatar pcomputo commented on August 25, 2024

sorry about that. Can you please try maximizing the window? It may not have a problem then. The Chrome window is launched by the script, please maximize it. It's odd since the script should do it manually. Let me look into this.

from whole-foods-delivery-slot.

mattmeng87 avatar mattmeng87 commented on August 25, 2024

!
Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 21, in autoCheckout
slot_select_button = driver.find_element_by_xpath('/html/body/div[5]/div[1]/div/div[2]/div/div/div/div/div[1]/div[4]/div[2]/div/div[3]/div/div/ul/li/span/span/div/div[2]/span/span/button')
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\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[1]/div[4]/div[2]/div/div[3]/div/div/ul/li/span/span/div/div[2]/span/span/button"}
(Session info: chrome=81.0.4044.92)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 124, in
getWFSlot('https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1')
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 107, in getWFSlot
autoCheckout(driver)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 26, in autoCheckout
slot_select_button.click()
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (698, 528). Other element would receive the click:

...

(Session info: chrome=81.0.4044.92)

I believe it was maximized. Not 100% though, it beeped I still got my order through so thank you :)
Ill make sure its maximized and rerun this.

from whole-foods-delivery-slot.

pcomputo avatar pcomputo commented on August 25, 2024

I just checked the script, its working end to end on my end. I'm not sure what's causing that problem.
I increased the sleep time for just in case, if you pull the latest changes.

from whole-foods-delivery-slot.

mattmeng87 avatar mattmeng87 commented on August 25, 2024

I thank you for the script! I don't know how to code or much about python so this took me a couple hours to get running so it very well could be on my end.

from whole-foods-delivery-slot.

joelnale avatar joelnale commented on August 25, 2024

Hi when I run in the CMD: python whole_foods_delivery_autobuy_windows.py

I get the following error:
c:\amz>python whole_foods_delivery_autobuy.py
File "whole_foods_delivery_autobuy.py", line 7

^
SyntaxError: invalid syntax

Can you advise?

from whole-foods-delivery-slot.

mattmeng87 avatar mattmeng87 commented on August 25, 2024

Ok your update seemed to have allowed it to click at least. I got to the next screen with the script now but it doesnt hit continue purchase after.

Warning (from warnings module):
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 83
soup = bs4.BeautifulSoup(html)
UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 83 of the file C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.

SLOTS OPEN!
Clicked open slot
Selected slot and continued to next page
Found a slot but it got taken, run script again.
Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 42, in autoCheckout
payment_select_continue = driver.find_element_by_xpath('/html/body/div[5]/div[1]/div[2]/div[2]/div[4]/div/form/div[3]/div[1]/div[2]/div/div/div/div[1]/span/span/input')
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\lib\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[2]/div[2]/div[4]/div/form/div[3]/div[1]/div[2]/div/div/div/div[1]/span/span/input"}
(Session info: chrome=81.0.4044.92)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 124, in
getWFSlot('https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1')
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 107, in getWFSlot
autoCheckout(driver)
File "C:\Users\Home\AppData\Local\Programs\Python\Python38-32\Scripts\whole_foods_delivery_autobuy_windows.py", line 61, in autoCheckout
winsound.Beep(freq, duration)
NameError: name 'freq' is not defined

html parser have anything to do with it?

from whole-foods-delivery-slot.

pcomputo avatar pcomputo commented on August 25, 2024

no not really. The script did run and get a slot but by the time it reached the checkout slot, the slot got taken by someone else. It needed a variable called freq. Pushed latest commits. Do git pull and run the script just like the way you did before.

from whole-foods-delivery-slot.

 avatar commented on August 25, 2024

@pcomputo That is exactly what happens all the time. I get the slot, the credit card is already selected, and I get to the point where I place the order but then the order does not go through and I am back to square one. Irritating. What is the freq variable for?

from whole-foods-delivery-slot.

mattmeng87 avatar mattmeng87 commented on August 25, 2024

well the script ran and it showed 1 slot it refreshed and had 2 slots it then chose a slot and then left me there. Slot wasn't actually taken I was here so I manually ordered so I know it worked it just didnt finish the order. I will run again and tell you results

from whole-foods-delivery-slot.

mattmeng87 avatar mattmeng87 commented on August 25, 2024

Ok ran again with updated. It did the same thing. The script is saying that the slot was taken but it actually does click on the slot and move to the next page but from there it seems like it thinks someone else took the slot. I can click continue manually and then one more click to finish the order.

from whole-foods-delivery-slot.

pcomputo avatar pcomputo commented on August 25, 2024

You need to let the script run. After selecting a button and going to the next page, the script sleeps to let the page load. Sit back and dont touch anything till you see an error on the terminal. It will work till the end.

from whole-foods-delivery-slot.

 avatar commented on August 25, 2024

@pcomputo Still does not work. Even leaving the window untouched and with the latest pull the same error appears:

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (656, 636). Other element would receive the click:

...

(Session info: chrome=81.0.4044.92)

You mentioned it works for you. I saw you increase the wait time to allow the page to fully load. Looking at the error message and doing some research, it appears that the element the script is trying to click is behind another element, hence the error. Or it may be further wrapped in a div or span.

from whole-foods-delivery-slot.

pcomputo avatar pcomputo commented on August 25, 2024

keep trying git pull to make sure you are on the latest version of the code. I added an explicit scroll to make sure the element is visible, if it doesnt maximize.

from whole-foods-delivery-slot.

 avatar commented on August 25, 2024

That is exactly the issue. Even when maximized the element may not be visible depending on the resolution. I manually scrolled the page to the end and it stays that way, so it appears that hurdle has been solved. I'll git pull to get the new version that does the scroll. Thanks.

from whole-foods-delivery-slot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.