jvolker / miq-nz-booking-tools

Tools to help booking a spot in New Zealand Managed Isolation and Quarantine. Automatically refreshes, checks and fills forms in the website to find and book the rare spots.
MIT License
83 stars 35 forks source link

How many specific MyDates can I enter #121

Open axysnz opened 3 years ago

axysnz commented 3 years ago

Hi

How many specific YYYY-MM-DD dates can be entered into MyDates field in miq-assistance.js Since flights from the States only arrive on certain days then there's no point in searching for other days but I think I read somewhere there there is a limit to how many days you can enter but I can't find the reference again. If there are two good days per week and you want to check the next 3 months that's around 24 dates....

mark-bloom commented 3 years ago

I don't see anything in the .js that limits the number of dates. I suppose a large number of dates may cause the program to slow down, but should be a minimal effect compared to other factors such as website latency.

axysnz commented 3 years ago

Thanks Mark I have loaded 24 dates and (once I got the syntax correct without any missing commas) it certainly didn’t crash. I just hope that it will only alert me when those dates come up. I also set the findAnyDate to false which I assume is needed for specific dates.

cmartin-kavlifoundation commented 3 years ago

I have about 20 specific dates (and findAnyDate=false) and I've successfully gotten a few alerts (but was too slow to lock them in). The only other thing I learned was to be sure to include the leading zeros in the months and days, e.g. 2021-08-01 Good luck!

axysnz commented 3 years ago

Thanks Martin. Did it select the date for you or did you have to click on it then the captcha and next?

cmartin-kavlifoundation commented 3 years ago

Thanks Martin. Did it select the date for you or did you have to click on it then the captcha and next?

It was selected. I then did captcha, clicked next, only to discover that I was too slow. Those dates seem to only last for 2-3 seconds at most. One of these days I'll be lucky.

mouarg commented 3 years ago

How about a combination of days and months? For eg: '2021-10-14', '2021-11'

Would that work or it has be in YYYY-MM-DD format only? Thanks

axysnz commented 3 years ago

The sample miq-assistance.js has both formats in it so I assume that it's possible. It's important to include the leading zero on single digits.

'2021-09', '2021-10-04' etc.