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

Force search for same-day #65

Closed mzguy closed 3 years ago

mzguy commented 3 years ago

Amazon often offers delivery next day if the current day is unavailable. Any idea how to modify the script to ignore the next day, and respond only if same-day slots are available?

pcomputo commented 3 years ago

Probably, Line 23 in wholefoods_delivery_autobuy.py you could modify the slot_button as

if driver.find_element_by_xpath("//*[@id="shipoption-select"]/div/div/div/div/div[1]/div[2]/div[2]/div/ul/li[1]/span/span/span/button/div/div[1]").text == "Today": 
    #code from repo
else:
    #run script from start
mzguy commented 3 years ago

I'll try this sometime. Thanks!

mzguy commented 3 years ago

I'm getting "Invalid syntax" with the above substitution. I'm not good with Python. Is there an error somewhere in what you posted?

Also, is "#code from repo" something native to Python or did you intend I substitute something there?

Thanks!

mzguy commented 3 years ago

I'm getting "Invalid syntax" with the above substitution. I'm not good with Python. Is there an error somewhere in what you posted?

Also, is "#code from repo" something native to Python or did you intend I substitute something there?

Thanks!

@pcomputo Could you please clarify?