Open galsivan opened 4 years ago
@galsivan can you please provide a screenshot and a more detailed description of what you are looking for. Thanks!
I have already written the fix, just trying to make a PR and don't know how to associate with issue. It solves one of the incompatible screenshots. I'll make the PR once i fig out how to name it. Then you can feel free to reject or comment or merge. it';s a tiny change
Cool cool. Sounds good. Excited to read it!
don't have access rights to repo. want to grant me? not sure how it works on public github, but im already on ssl etc.
15:23 ~/Documents/Development/Amazon-Fresh-Whole-Foods-delivery-slot-finder (issue-22)$ gipo
Warning: Permanently added the RSA host key for IP address '140.82.114.4' to the list of known hosts.
ERROR: Permission to ahertel/Amazon-Fresh-Whole-Foods-delivery-slot-finder.git denied to galsivan.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
can also just paste the diff here if you like. I did minimum test it ran without erroring out for me - you should make the changes and test on your end. Then you can re-generate the .scpt
file you don't have to take mine.
5:25 ~/Documents/Development/Amazon-Fresh-Whole-Foods-delivery-slot-finder (issue-22)$ gid HEAD~1
diff --git a/delivery-window-finder.applescript b/delivery-window-finder.applescript
index 54d0c80..e2e977d 100644
--- a/delivery-window-finder.applescript
+++ b/delivery-window-finder.applescript
@@ -7,6 +7,8 @@ set unknown_page_msg to "Unknown amazon page was loaded. try to manually navigat
set slot_site_url to "https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1"
set slot_page_keyword to "Schedule your order"
set no_slot_keyword to "No delivery windows available"
+set no_doorstep_slot_keyword to "No doorstep delivery windows are available"
+set no_attended_slot_keyword to "No attended delivery windows are available"
set is_first_run to true
set auto_ignore_oos to true
@@ -238,7 +240,7 @@ if javascriptEnabled then
-- PROCESS PAGE CONTENTS:
-- no delivery slots available
- if siteText contains no_slot_keyword then
+ if (siteText contains no_slot_keyword) or (siteText contains no_doorstep_slot_keyword) or (siteText contains no_attended_slot_keyword) then
-- closes the tab since no slot was found
tell application "Safari"
diff --git a/delivery-window-finder.scpt b/delivery-window-finder.scpt
index 664d834..8f61564 100644
Binary files a/delivery-window-finder.scpt and b/delivery-window-finder.scpt differ
suit yourself :) Thanks for an amazing tool!
Will work on integrating this soon. I might have some questions. Will let you know :) Thanks!
@galsivan would you be willing to update your initial comment on this issue with a screenshot of your delivery slot page(w/ your address hidden) so others can compare their slot page to yours? I can then also add that screenshot to the 'Compatible' section, after I add your changes. Thanks for considering.
@galsivan or does your page just look like example 2 from the Incompatible section
It does - but in your example there are some slots so there's a slight difference. Here's my page:
updated bra :)
I also live in NYC, and have the page for Amazon Fresh looks exactly like this screenshot for me too. @galsivan: Has the above diff been tested to work? If so, I'll use that locally.
@galsivan's diff seems to work for me (I'm also in NYC) though does it search through properly for all the different days or is it only checking the current day? (which is what I suspect)
Not sure why it would make the script behave differently than without this change with regards to days that it checks?
@Haugum yes it works for me been able to get delivery slots twice already in a single day!
@galsivan I live in NYC, have the same screen as you (multiple days + attended/doorstep). I need to get some deliveries for older neighbors. Can you help me implement your version of the script?
just download the applescript file and change the lines according to the diff.
a '-' sign means old version of a line, a '+' is the new version of it. after that you follow same directions and hit play. @ahertel did you want to merge these changes or give me permission to make an official PR? let me know if you need anything else from me
On Fri, Apr 10, 2020 at 12:38 PM seedubs notifications@github.com wrote:
@galsivan https://github.com/galsivan I live in NYC, have the same screen as you (multiple days + attended/doorstep). I need to get some deliveries for older neighbors. Can you help me implement your version of the script?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahertel/Amazon-Fresh-Whole-Foods-delivery-slot-finder/issues/22#issuecomment-612112265, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLTG4H6H3UES6SEPHA37YDRL5DQ3ANCNFSM4MDLXPXA .
-- Check out my drum channel: https://www.youtube.com/jamesdrumschool
@galsivan I added two lines of code and replaced one as indicated by your + above but this has caused the script to stop working for me. The script goes through all the prompts, the page opens and minimizes, goes to the check-out page but then never refreshes.
@galsivan Should slot_page_keyword be changed to "Reserve your time"?
@galsivan if you fork the repo you can commit the changes there and then open a pull request I believe
@jonmarkgo Thank you so much i knew it had to do something with forking i use git a ton at work but not too much on github i'll do this.
@remirr the way it works for me is the script yells an error apple event time out or page unknown - i forget which and don't have time to test too much, and then when i refresh the page it immediately takes me to the cart checkout page where i already have a slot picked and the timer is going and i just have to confirm payment. i haven't gone into too many details just really did this quick and dirty in order for it to work for me. maybe i'll fork and actually contribute.
@ZJCXZZ it might be how to do it. i had it in a way that there was no error and this might have been it. i don't have a copy of the page when it already gives you a time to select, but this might be it. i'll make these changes in a PR after i test.
@jonmarkgo I Suspect the same. Is it only checking the first day or all days
@galsivan's diff seems to work for me (I'm also in NYC) though does it search through properly for all the different days or is it only checking the current day? (which is what I suspect)
@galsivan So I made the changes you have listed above with the + and -. here are my findings.
1) This works with Wholefoods. I got multiple alerts form my mac including that an item was removed and a slot is available. 2) It has not worked for Amazon Fresh. Whilst the script runs and the page refreshes, when slots open up it just refreshes over the top and keeps going. On Friday afternoon, I happened to look at my laptop when a whole bunch of slots opened up and the script just kept running and refreshing. In fact, I clicked on the window and as I was selecting a slot, the script just refreshed the page again. Has anyone solved this?
@ZJCXZZ - did changing that value help?
@ahertel I am not sure if you got this working for NYC?
Thanks,
Add support for NYC and / or pages that look like example 2 of incompatible pages and the below:![image](https://user-images.githubusercontent.com/14103408/78726444-017ab000-7900-11ea-9d27-e7afe419d1fd.png)