Open mannix515 opened 4 years ago
Tried running this but didn't seem to work. It opened a general amazon UK window but didn't go to the fresh delivery page... then announced it had found a delivery. Would be great to get this working!
Tried running this but didn't seem to work. It opened a general amazon UK window but didn't go to the fresh delivery page... then announced it had found a delivery. Would be great to get this working!
Still working for me!
The delivery announcement sounds like a false positive to me due to only searching for "am" or "pm' strings which, on any other page could exist as part of other words, but on the delivery page only exist when a slot is found.
This might be better (untested):
else if siteText contains "00am" or siteText contains "00pm" then
In the above the times are incorporated too, and I think this should work as the slots are always hourly eg. 11:00am - 1:00pm and never (afaik) on the half or quarter-hour.
Thanks for responding!
Am using safari and browsed to that page.
Is this (https://www.amazon.co.uk/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1) the delivery page for you?
I get this:
This seems to be the correct delivery webpage for me: https://www.amazon.co.uk/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1
No worries!
https://www.amazon.co.uk/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1 is correct - no idea why you're being redirected though - for me the script just refreshes in place once I've already browsed to that URL.
You can check the slot_site_url definition and it should match the URL of the delivery page where available slots are shown:
set slot_site_url to "https://www.amazon.co.uk/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1"
Hey there, we were chatting on reddit about this but wanted to add my changes here.
Screenshot of the slots page:
For no slots logic we have to check for three texts as it splits it out into morning. afternoon and evening blurbs and if all three are present then we know there's no slots. Otherwise, and as the screenshot shows, checking for lowercase "am" or "pm" works for the slot found logic - there's no need to check for the "slot_page_keyword" var as this is always present on the page even when there are no slots found.
My git is rusty, if I remember how to create a PR for my changes I'll put them in, otherwise find them here:
Thanks again for the initial work!