pcomputo / Whole-Foods-Delivery-Slot

Automated script for Whole Foods and Amazon Fresh delivery slot
Apache License 2.0
443 stars 152 forks source link

Please Help and Thank you for sharing this #5

Closed mp42244 closed 4 years ago

mp42244 commented 4 years ago

on my linux mint machine I consistently get the following error message " Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rrTU6M/chromedriver-binary/"

I am sure its something i am not doing right but need to get this working to avoid a trip to the grocery store for i have an underlining condition that makes it very unattractive.

pcomputo commented 4 years ago

Hello! I am here to help you. Thank you for using the script.

Can you please tell me the command that is throwing that error? I can help you with the step by step installation.

mp42244 commented 4 years ago

Hello Pooja,

Thank you so much for responding . I get that error message when I try to install requirements.txt by using:

pip install -r requirements.txt

On Apr 2, 2020, at 7:55 PM, Pooja Ahuja notifications@github.com wrote:

Hello! I am here to help you. Thank you for using the script.

Can you please tell me the command that is throwing that error? I can help you with the step by step installation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pcomputo commented 4 years ago

ah. Which Python version are you using? python --version

mp42244 commented 4 years ago

Python 2.7.15rc1

pcomputo commented 4 years ago

Instead or running the requirements.txt can you try to manually run these commands and see if you still get the error?

sudo apt-get install python-bs4 sudo apt-get install python-pip sudo pip install selenium sudo pip install urllib3

mp42244 commented 4 years ago

sure

mp42244 commented 4 years ago

i get the following error message when i run the first command

File "", line 1 sudo apt-get install python-bs4 ^ SyntaxError: invalid syntax

mp42244 commented 4 years ago

apologies i tried running from wrong directory. will correct

mp42244 commented 4 years ago

here are results

matt@matt-ideacentre-300S-08IHH:~$ sudo apt-get install python-bs4 [sudo] password for matt: Reading package lists... Done Building dependency tree
Reading state information... Done The following packages were automatically installed and are no longer required: libgtkglext1 libtinyxml2.6.2v5 Use 'sudo apt autoremove' to remove them. Recommended packages: python-chardet python-lxml | python-html5lib The following NEW packages will be installed: python-bs4 0 upgraded, 1 newly installed, 0 to remove and 784 not upgraded. Need to get 67.9 kB of archives. After this operation, 375 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-bs4 all 4.6.0-1 [67.9 kB] Fetched 67.9 kB in 0s (161 kB/s)
Selecting previously unselected package python-bs4. (Reading database ... 257625 files and directories currently installed.) Preparing to unpack .../python-bs4_4.6.0-1_all.deb ... Unpacking python-bs4 (4.6.0-1) ... Setting up python-bs4 (4.6.0-1) ... matt@matt-ideacentre-300S-08IHH:~$ sudo apt-get install python-pip Reading package lists... Done Building dependency tree
Reading state information... Done python-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1). The following packages were automatically installed and are no longer required: libgtkglext1 libtinyxml2.6.2v5 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 784 not upgraded. matt@matt-ideacentre-300S-08IHH:~$ sudo pip install selenium The directory '/home/matt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/matt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting selenium Downloading https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl (904kB) 100% |████████████████████████████████| 911kB 1.5MB/s Collecting urllib3 (from selenium) Downloading https://files.pythonhosted.org/packages/e8/74/6e4f91745020f967d09332bb2b8b9b10090957334692eb88ea4afe91b77f/urllib3-1.25.8-py2.py3-none-any.whl (125kB) 100% |████████████████████████████████| 133kB 6.3MB/s Installing collected packages: urllib3, selenium Successfully installed selenium-3.141.0 urllib3-1.25.8 matt@matt-ideacentre-300S-08IHH:~$ sudo pip install urllib3 The directory '/home/matt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/matt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: urllib3 in /usr/local/lib/python2.7/dist-packages

pcomputo commented 4 years ago

Its confusing, it installed looks like. Can you try running the script and tell me what errors you get so we can start by installing those packages.

mp42244 commented 4 years ago

Will do

On Apr 2, 2020, at 8:38 PM, Pooja Ahuja notifications@github.com wrote:

Its confusing, it installed looks like. Can you try running the script and tell me what errors you get so we can start by installing those packages.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mp42244 commented 4 years ago

seems like im getting closer. i ran the script and got :+1:

File "whole_foods_delivery_slot_chrome.py", line 50, in getWFSlot('https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1') File "whole_foods_delivery_slot_chrome.py", line 15, in getWFSlot driver = webdriver.Chrome() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

pcomputo commented 4 years ago

cool, so now you'd need the Chromedriver and run the script. Can you please run the following commands:

sudo apt-get install unzip wget -N http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip -P ~/Downloads unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads making it an executable and moving it to /usr/local/share chmod +x ~/Downloads/chromedriver sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

then try running the script. If it doesnt run with the above commands, then run the first three commands only. Then do to Downloads, copy paste the path to the chromedriver unzipped file. And then go back to the Python script and paste the copied path between the "()" in driver = webdriver.Chrome()

mp42244 commented 4 years ago

getting closer. when i run the script i get the following error. looks like i am on the wrong verison of chrome. i am on 75 not 80. thinking i should upgrade?

matt@matt-ideacentre-300S-08IHH:~/Downloads/script/Whole-Foods-Delivery-Slot-master$ python whole_foods_delivery_slot_chrome.py Traceback (most recent call last): File "whole_foods_delivery_slot_chrome.py", line 50, in getWFSlot(' https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1 ') File "whole_foods_delivery_slot_chrome.py", line 15, in getWFSlot driver = webdriver.Chrome() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in init desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

On Fri, Apr 3, 2020 at 10:50 AM Pooja Ahuja notifications@github.com wrote:

cool, so now you'd need the Chromedriver and run the script. Can you please run the following commands:

sudo apt-get install unzip wget -N http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip -P ~/Downloads unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads making it an executable and moving it to /usr/local/share chmod +x ~/Downloads/chromedriver sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

then try running the script. If it doesnt run with the above commands, then run the first three commands only. Then do to Downloads, copy paste the path to the chromedriver unzipped file. And then go back to the Python script and paste the copied path between the "()" in driver = webdriver.Chrome()

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pcomputo/Whole-Foods-Delivery-Slot/issues/5#issuecomment-608478371, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBIDGFFVGTSJSVLZAQF633RKXZUDANCNFSM4L3C4CBA .

pcomputo commented 4 years ago

yep, you should try updating your Chrome

mp42244 commented 4 years ago

I did and the script runs. Thanks so much !!!!

On Apr 3, 2020, at 1:03 PM, Pooja Ahuja notifications@github.com wrote:

yep, you should try updating your Chrome

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mp42244 commented 4 years ago

Is there a new script I should be running which checks the next day too?

On Apr 3, 2020, at 5:15 PM, Matt Pocchia matthewpocchia@gmail.com wrote:

I did and the script runs. Thanks so much !!!!

On Apr 3, 2020, at 1:03 PM, Pooja Ahuja notifications@github.com wrote:

yep, you should try updating your Chrome

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pcomputo commented 4 years ago

you'll keep running the same script. Also, keep running git pull. This will keep pulling any new changes I keep pushing.

mp42244 commented 4 years ago

Been running latest script for 3 hours and no luck. Is that normal ?

On Apr 3, 2020, at 6:11 PM, Pooja Ahuja notifications@github.com wrote:

you'll keep running the same script. Also, keep running git pull. This will keep pulling any new changes I keep pushing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pcomputo commented 4 years ago

yes, it depends when Amazon opens their slots. You can also keep checking the terminal, you'll keep seeing a bunch of "refresh" which indicates the script is working.

mp42244 commented 4 years ago

Yes it’s definitely working! It’s really nicely done

On Apr 3, 2020, at 8:32 PM, Pooja Ahuja notifications@github.com wrote:

yes, it depends when Amazon opens their slots. You can also keep checking the terminal, you'll keep seeing a bunch of "refresh" which indicates the script is working.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.