Coder Social home page Coder Social logo

jvolker / miq-nz-booking-tools Goto Github PK

View Code? Open in Web Editor NEW
83.0 17.0 36.0 259 KB

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.

License: MIT License

JavaScript 90.37% HTML 9.63%
miq new-zealand covid nz-managed-isolation quarantine booking

miq-nz-booking-tools's People

Contributors

alexdrinkwater avatar jvolker avatar monagjr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miq-nz-booking-tools's Issues

Error: Cannot find module

Hi there,

thanks for your hard work.

Unfortunately after following the install instructions i receive the following error message after the command npm start (as admin):
I'll checked, unfortunately lots of folder in the node_moduls folder but no npm folder

Error: Cannot find module 'C:\Users\JH\Desktop\MIQ\miq-nz-booking-tools-master\miq-nz-booking-tools-master\MIQ-Booking-Assistance\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
internal/modules/cjs/loader.js:905
throw err;
^

Error: Cannot find module 'C:\Users\JH\Desktop\MIQ\miq-nz-booking-tools-master\miq-nz-booking-tools-master\MIQ-Booking-Assistance\node_modules\npm\bin\npm-cli.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:746:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}

Thanks for your help

App No Longer Running / Refreshing

Hi there,

Not very technically literate so apologies in advance if this is just some silly user error on my part, however I can't seem to get the app (Windows 10 v0.10.0) to run correctly anymore.

I think it was working earlier and had refreshed around 120 times on the 5s default Refresh Time and then apparently stopped / froze.

Since then when I follow the instructions and launch the app and login I get the "Found "Secure your allocation" page! etc." notification however the "b. Arrival details" page doesn't appear to refresh and the reCAPTURE periodically states "Verification expired" and requires me to re-check.

I've tried deleting and reinstalling and going to the main website to match room request details to the app default in case that was causing some conflict but nothing seems to have helped.

Is there something I am missing or doing incorrectly in the process or is this a bug?

Thanks

Speeding up the date selection process

Right now it takes 5 seconds to see a new date and then once you click it you need to do a captcha on the newly reloaded page. We could open two pages, one that refreshes every 5 seconds to get the new dates while the other is "staged" where the user has already completed the captcha. When the reloading page finds a date, we can communicate that to the staged page with the date, enable the date and auto click the date via js and then click the next button. The only issue here is that captchas have a few minutes timeout after completing them so the user would need to redo the captcha every few minutes to gain this advantage.

reCAPTCHA branch

Hey mate, thanks a million for building this. I was nearly finished building one when I decided to look on Github and see if anyone had already completed a project lol - I'll just need to modify your .js files to look scroll over and scan November instead (to suit my situation).

When building mine, my only hurdle was automating the reCAPTCHA part, but I have some ideas and are keen for some input: there's a Chrome Extension called Buster which essentially switches to an audio capture and downloads the audio file then transcribes it through Google's own voice recognition software.

My only problem was automating the actual HTMLElement.click() function and ticking the sodding captcha box. It's due to being contained within an iframe in the actual HTML code.

So how familiar are you with HTML and working with iframes? If we can identify and work with the element there and successfully click the reCAPTCHA box, or send a TAB + ENTER key to it from the previous element, we could then activate the Buster chrome extension and essentially automate that too.

What are your thoughts?

403 Forbidden

Getting an 403 Forbidden error after about 5 - 10 mins of runtime. Domain is probably detecting too much activity.

Is anyone else getting these?

MIQ alert folder

Hello,

I am trying to unpack the MIQ alert folder but it wont let me click on it. I am using a MAC computer. Could that be the issue?

thank you!

Building and deploying Electron App

@alexDrinkwater thanks so much for all your work on the Electron app.

I've just been building the app on macOS 11.2.3 (Big Sur). Unfortunately, when opening it I'm receiving this error

image

Big Sur has high-security standards and as a user, you often have to give permissions in multiple places.

I guess we either have to request permission from the user or not access the folder. I'm wondering if we really need to access this? We are not storing or reading anything as far as I can tell.

username and password fields

@alexDrinkwater continuing the conversation here. Yes, I agree.

We should either move username and password from miq-assistance.js into a separate file that will be git ignored.

I don't think there is a lot of benefit from keeping them in there anymore as it still requires some manual steps. I found it easier to just log in instead. So maybe it's best to just remove them entirely.

MIQ Booking Assistance Month Select Query

Hi, firstly thanks for all of your great work with this. I've yet to get a spot, but your work gives me some hope...

With the updated code, should we just be updating the required month on line 5, or should we also be selecting the same date on line 91?
e.g
Line 5 - const month = 8;
Line 91 - fp.changeMonth(month - 8, false)

MIQ Booking Assistance

Hey there - I've been able to get the booking assistance script to work but just wondering how I input custom dates for it to search? Currently it's searching through July till November and doesn't seem to be stopping when an available date pops up. It just continues to refresh and search through July to November. Had to manually go to the month when an available date showed up.

Any help with this would be greatly appreciated.

Electron app

What do you thinking about making the booking helper into an electron app so that people don't need to install node? We could add a setting panel to control the variables.

Could the system please reset when we don't manage to get the date in time?

As of writing, I've never been able to secure a date in time. So the page refreshes instead of going to the next step. But it seems that because "found" has been triggered, the proggy stops work.

It would be great if it could detect the page has simply refreshed and not gone on to the next steps of the booking.

Thanks so much for working on this project.

Manifest file is missing or unreadable

Hey mate,

Cheers for all the work you have done so far with this.

When I go to load unpacked extensions and select the unzipped file it says Manifest file is missing or unreadable.

Any idea how to fix?

Cheers

No sounds with alert

Hi,

Thanks so much for making this. I have been running this but I haven't heard any beeps, but the MIQ twitter alerts have been showing a few dates pop up here and there. Are there any other settings I need to change in Chrome to get the notification sounds?

Thank you!

Advantage to NZ users

As more people are using "scripts" one thing to highlight is the advantage New Zealand users have over foreign users. This is because it takes longer for people with a higher latency between their device and the servers in wellington (or wherever they are in NZ) to send the request for a room. If you have access to a computer physically in New Zealand it will be at an advantage to find spots over one further away. This reminds me of how the NYSE has 38 miles of extra wire for connections that are in the building to increase their latency and reduce the time advantage they have for trades. This maybe something to add to the documentation.

Problem with CAPTCHA during MIQ Booking

Whenever I use powershell to do step 2, it takes longer for me to fill out the form than I would manually because of the CAPTCHA. The CAPTCHA constantly asks me to pick the correct pictures which takes me 5-10 seconds to complete. Is there any way for me to overcome this? It doesn't happen when I'm logged in on chrome without powershell and just refreshing the page, so I'm not sure what the problem is.

Refresh/restart

A query about refresh which stops the search. The alarm sounds when any date appears in the month selected. If that's not the date required, its not clear how to restart the Assistant other than exiting, reloading the Assistant and logging in again. Maybe there is a shortcut I am missing

Cannot restart search when I change settings

As soon as I have clicked 'view' after logging on, the program starts. It doesn't give me an opportunity to change the month so it is always stuck on the current month. Although I can add a day or a month, I can then not click 'restart search' because it is greyed out.

help a newbie out - guide for dummies (please!)

Hi, I'm trying to install the MIQ Booking assistance script (with no experience in coding). Can anyone share a bit more guidance for dummies like me... Would be massively appreciated, I'm lost at the install npm-i. Thanks!

help

new to coding, on a mac starting from scratch any suggestions?? so far downloaded the terminal and already stuck

Twin Rooms

Thanks heaps to Jeremias for developing this and all the others who are continuing to develop it. I am a newbie but with a bit of help, have it working. There is a suggestion somewhere that the hardcode double room can be changed to twin. Where and how do I do that?

Mac software update?

Hi there, I was just wondering whether there'll be an update for Mac users too, now that the MIQ website has changed? Cheers :)

Webpage not refreshing itself since afternoon

I have tried both versions of applications on Windows 10 and the webpage is not refreshing anymore since afternoon

Troubleshooting

  1. Cleared cache
  2. Restarted the app
  3. restarted the laptop
  4. tried on a different laptop. Still an issue

not confirming the date after hitting next on callendar page

HI I got the beeped I again the 3rd time,I pushed in-captcha then next button went to the next screen said confirm accommodation the next step did not complete , the messages I have seen before once to hit next after picking an available date is something like"wait while your booking is confirmed" however it just went backwards to confirm accommodation I think there may be a bug in it as it that makes it go backwards to the page that is already auto filled? any suggestions on what to do? also all 3 beeps were on November 1st

Android build possible?

Is this something that could happen? I'm not at my PC enough to take advantage of an available booking when I get a notification of one being found.

Mac version 0.10.0

Hi There

Just downloaded MIQ Booking assistance v 0.10.0 for Mac and followed instructions.
The App has fired up Chromium and I have logged in and navigated to the select date page.
App says: Found "Secure your allocation" page! Wait for beep sound, then select date and continue booking.
Browsers says it is being controlled by automated test software. But the page is not being refreshed every 5 seconds as the App window indicates. App window Restart Search button is also grayed out.
The MIQ site then times out and asks for re-login.

3 months visible in browser

Hi everyone,

Like everyone here I am totally struggling to get back home... so thanks for creating the chat and offering help.
In the MIQ alert code there is the below condition....
"Make sure your browser window is large enough that all 3 months can be displayed at once"

I'm not able to show more than one month at a time - I guess it slows me down to click each month.
Is it possible to show all available months at once?

Thanks so much!

Multiple months

Mr Volker thank you so much for doing this!

I now have it up and running and scanning October. I have no knowledge of Java and the way this script is working.

Can someone please advise if is it possible to scan more than one month, ie can I scan Nov and Oct?

Many thanks in advance

No "npm i" in folder

Hi Guys.
Not a coder or anything like that but trying to book MIQ for my daughter.
I have followed instructions but the npm I does not appear in the MIQ-Bookings-Assistance folder.

Any suggestions.

Working on a Mac

Thanking you in advance

Andy

Windows v0.10.1 reCAPTURE

Hi there,

I had an earlier issue of the app not refreshing however I've run the new 0.10.1 version and that seems to have fixed it so thanks for that.

Quick question though, does it make any difference or if the reCAPTURE "I'm not a robot" box is checked or not? Or is the script automating that?

Thanks

Nothing happens when clicking 'next' after a date is found

Firstly, many thanks to Jeremias & Alex for all the work you're putting into this. This crazy MIQ system would be impossible to navigate without this script.

I'm looking for a slot in Nov and had two hits over the last three days. I very quickly selected the date (the new highlighted date worked a treat, thanks), checked the reCaptcha and then the bold 'Next'. Each time nothing happened, except the script stopped running, with the message line changing from 'Checked MIQ: xxx' to 'Success' or some such.

I had expected to move further in the booking process. Maybe I was just too slow?

Of note, checking my Chrome Version I found that it needed an update from 91.0.4472.124 to 91.0.4472.164 - not sure if that was a factor?

Date picker not working

Most recent update:
Expected behaviour:
let myDates = ['2021-11-30']

Once I have navigated to the "Selected your intended arrival date" puppeteer will click to the correct month (in this case November).

Actual behaviour:

Puppeteer just stays on July and doesn't navigate to November.

Updated MIQ page format?

Hi there,
It seems like MIQ have updated their site format, likely to force all current scripts to be updated.
They now have a a) and b) section for booking a room / date. See the attached screenshot.
Cheers,
Ferdinand
image

Running on M1 OSX issue...

Hi,
First - thanks for a useful tool - I hope it helps me get a spot.
It works fine for me in a linux VM, but trying to run it natively on an Apple M1 (armv6) based processor has issues with accessing chromium (which is at /opt/homebrew/bin/chromium). The build completes, after setting these:

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
PUPPETEER_EXECUTABLE_PATH=/opt/homebrew/bin/chromium

However, when trying to run MIQ-Booking-Assistance, it does this:

hugh@adminsocs-mbp MIQ-Booking-Assistance % npm start
> [email protected] start
> node index.js
/Users/hugh/Downloads/miq-nz-booking-tools-master/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193
            reject(new Error([
                   ^
Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

I then tried to set the browser using the launch script:

    const browser = await puppeteer.launch({ 
        executablePath: '/opt/homebrew/bin/chromium',
        ......

But this made no difference. Do you have any suggestions as to how to make the script recognize the chromium browser?
Cheers Hugh

was not able to confirm booking after clicking next went to confirm accommodation not sure why

when I responded to the beep immediately for a available room i completed the re-CAPTHA and hit next
I went to enter your accommodation screen it happened 2 time for same room within 5 minutes
did i just miss the mroom because someone was faster or what else could it be? I felt like i had been able to move right trough within 2/3 second to secure the 2nd time i as able to secure

MIQ-Booking-Assistance folder not found

Thank you very much for writing this and putting it up here, absolute legend!
I'm trying to figure it out to get it going to book a MIQ slot but seem to be stumbling early on.
i've downloaded node and the MIQ-Booking-Assistance folder. Open terminal and use the 'cd Downloads/MIQ-Booking-Assistance' but it comes back with -bash: cd Downloads/MIQ-Booking-Assistance: No such file or directory
Sams-MacBook-Air:~ samosborne$

Saw previously you could 'cd then drag and drop the folder as well but get the same message coming back.

appreciate anyones help

Should script scroll through months on screen?

Just checking if script is working correctly for me - I've selected 'any date' however on secure allocation page only see July on screen and does not scroll to other months. Is this correct?

Ability to specify dates

Hey thanks for publishing this

Can you add in the capacity to specify the desired date?

Some flights come fairly infrequently so people can be limited by their viable choices

Again thank you

app unsafe message

HI Jvolker I am not able to open the app you sent it say unsafe? I am not that familiar with the app so unsure anything you can do to helpme understand Thanks just trying to get a spot

Stuck after downloading Node

Hi all,

I've got no coding experience or anything like that. Thought I could follow the instructions but stuck after downloading node.

I downloaded node on windows, followed the install wizard let it do its thing.

Number 2. on the instructions 'Open a command-line window and navigate to the MIQ-Booking-Assistance folder and run npm i to install all dependencies'.

How do I open a command-line? I tried opening node and typing MIQ-Booking-Assistance and it didn't work, I typed MIQ-Booking-Assistance in the node command prompt window that was also in the downloaded files and that didn't work either. I've tried to read through the help and other files and I feel like I'm missing something big and obvious here.

Would love some help if someone has time for someone who doesn't know whats going on.

Cheers!

Booking 2 Rooms

Thanks Mr Volker. This is great!

However, I'm hoping to book 2 rooms for a family of 5. Is there any way of adding a pre-filled tick 'No' for the disability needs question for room 2 as well?

Secure Spot But Lose It When Trying To Complete Step 2

Hi - I am using the alert code but haven't managed to get the booking code running just yet.
I have however secured a spot and when I press next I lose it , even though I have selected the no to disabled Q and the capta is correct.

Am I being penalised perhaps for having 2 windows open (one in chrome and other in firefox as per your readme notes ) and their is some kind of background check.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.