silverandroid / drivetest-ca-availabilities Goto Github PK
View Code? Open in Web Editor NEWA Node.js script for seeing which dates are available for driving test centers around Ontario
License: MIT License
A Node.js script for seeing which dates are available for driving test centers around Ontario
License: MIT License
Using npm instead of yarn, I know it is not recommended. But it throws an error even if I pass the CLI argument --licenceType G
.
`Cannot read property 'licenceType' of undefined'. I am guessing it is trying to load config which throws undefined?
Hi, I was trying to implement something similar when I came across this. Looks like DriveTest updated their website and I'm not really sure how the captcha is working now.
If you have any insight to share let me know and I'll try and update your script.
After the recent update of the Drivetest website, I found that the scraper no longer passes the login phase on my end. The console log simply states "Finding available times for a G2 exam" then promptly exits. Is this reproducible on your end?
Every time I run Yarn start, it ask to update new version. I have downloaded ZIP and build it again but still same issue.
I am facing recaptcha issue. May I know is there any fix or something I am missing.
I am facing this recaptcha issue sometimes and once it starts coming it never goes. If you can handle this please? It happens just when we hit the submit button. The captcha response goes in the request to the verify driver email. But most of the time recaptcha validation gets failed and verify email returns error. I checked this with launch option debug: true
drivetest-2021-05-18_08-00-51.log
Selects a testing location and clicks forward through the months as far as it can, seems to happen with or without a current appointment booked and no matter what the months/location/radius are set to.
Thank you!
Describe the bug
An "TypeError: Cannot read property 'url' of undefined" on attempt to parse bookingDateResponse. Stack trace and log output:
C:\Temp\drivetest-ca-availabilities>yarn start -m 3 -l 43.41164387982603,-79.73245219532673 -r 5 --chromiumPath "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
yarn run v1.22.11
$ node cli.js -m 3 -l 43.41164387982603,-79.73245219532673 -r 5 --chromiumPath "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
INFO (24668 on DESKTOP-CRQBOB1): Checking for updates...
INFO (24668 on DESKTOP-CRQBOB1): No new updates found, current version 1.3.1
INFO (24668 on DESKTOP-CRQBOB1): Please pass the HCaptcha to continue...
INFO (24668 on DESKTOP-CRQBOB1): Waiting to be allowed to leave waiting room...
INFO (24668 on DESKTOP-CRQBOB1): Logging in...
INFO (24668 on DESKTOP-CRQBOB1): Finding available times for a G exam
INFO (24668 on DESKTOP-CRQBOB1): Going to be searching these DriveTest centers: Oakville
INFO (24668 on DESKTOP-CRQBOB1): If you appreciate my work, feel free to buy me a ☕️ (coffee) here 😊: https://www.buymeacoffee.com/rushilperera
ERROR (24668 on DESKTOP-CRQBOB1): TypeError: Cannot read property 'url' of undefined
at findAvailableDates_1 (C:\Temp\drivetest-ca-availabilities\scraper.js:203:64)
at findAvailableDates_1.next (<anonymous>)
at resume (C:\Temp\drivetest-ca-availabilities\scraper.js:36:44)
at fulfill (C:\Temp\drivetest-ca-availabilities\scraper.js:38:31)
error Command failed with exit code 1.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Hey, first off, thanks for this tool!
I can see dates available as the screen flashes through the months, but nothing is written to the terminal.
Also, everything just stops (presumably when it finishes scanning through all available test locations in the specified radius) - I thought this was supposed to keep running endlessly looking for dates? Or do I have to do it manually every so often?
Also, no errors on the terminal or log.
Describe the bug
Thanks for contributing to the open source world!
The login button keeps loading, and the page is stuck. Tried 3 times, same result.
System: osx 0.14.6
Browser: Chrome 92.0.4515.107
Command:
./drivetest-availabilities-macos -l * -r 80 -m 2 --licenseType G --email * --licenseNumber * --licenseExpiry * --chromiumPath /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
BTW, is your app go through each site once? Have you tried to repeat until session timeout? Do they ban bots users?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
i get this error about 30 seconds after launching the program where it seems to be stuck on the screen with all the locations on the map. i attached my log as well in case you want to take a look
drivetest-2021-05-18_00-36-17.log
Describe the bug
Getting below error when trying to execute the latest binary
ERROR (4019 on MacBook): Error: Failed to launch the browser process!
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/snapshot/drivetest-ca-availabilities/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
at Interface.<anonymous> (/snapshot/drivetest-ca-availabilities/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
at Interface.emit (events.js:387:35)
at Interface.close (readline.js:451:8)
at Socket.onend (readline.js:224:10)
at Socket.emit (events.js:387:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
To Reproduce
Steps to reproduce the behavior:
chmod a+x
to make the binary executable./drivetest-availabilities-macos -r 60 -l “xx.xxxxxx, -xx.xxxxxx” --licenseType G --email [email protected] --licenseNumber Bxxxx-xxxxx-xxxxxx --licenseExpiry “xxxx/xx/xx”
Expected behavior
Get some kind of valid output
Desktop (please complete the following information):
Describe the bug
Unexpected token error in JSON
To Reproduce
Don't edit config.json
run yarn start
Expected behavior
Script should run
Log output
SyntaxError: Unexpected token / in JSON at position 25 at JSON.parse (<anonymous>) at /Users/gurjot/GitHub/temp/drivetest-ca-availabilities/dist/cli/cli.js:41:27 at Generator.next (<anonymous>) at fulfilled (/Users/gurjot/GitHub/temp/drivetest-ca-availabilities/dist/cli/cli.js:5:58) error Command failed with exit code 1.
Desktop (please complete the following information):
MacOS
CANNOT log in to the main booking page.
Checking your browser before accessing drivetest.ca. ALL THE TIME
It seems that perhaps with the recent additions of the new offsite locations, the program is looking up incorrect sites for availabilities. For example, I've noticed that the automated window was actually searching in Blind River while printing results for Brampton, and Marathon instead of Mississauga, etc.
Describe the bug
It keeps giving me same error no matter what location arg I provide.
PS C:\driver> yarn start -l 43.7777392,-79.4348292 yarn run v1.22.11 $ node cli.js -l "43.7777392 -79.4348292" error: option '-l, --location <location>' argument '43.7777392 -79.4348292' is invalid. location coordinates must follow format <latitude>,<longitude>! error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. PS C:\driver>
I already have other arguments in json config file.
Describe the bug
Changed the URL and recompiled the code. Stuck on the information page. no response after manual input.
Tested on Microsoft Edge. OS: Windows 10
Describe the bug
The links used are outdated and produces a 404 response when attempting to use the tool
To Reproduce
Steps to reproduce the behavior:
Any usage of the tool since the first thing it tries is to open 'https://drivetest.ca/book-a-road-test/booking.html'
Expected behavior
The tool should visit 'https://drivetest.ca/dtbookingngapp/registration/signup' instead
Log output
Desktop (please complete the following information):
Hi,
I tried your awesome project but as soon as it got logged in it selected G exam and the process got exited.
{"level":30,"time":1623230697576,"pid":43911,"hostname":"MacBookPro.local","msg":"Checking for updates..."}
{"level":30,"time":1623230698158,"pid":43911,"hostname":"MacBookPro.local","msg":"No new updates found, current version 1.1.0"}
{"level":30,"time":1623230700775,"pid":43911,"hostname":"MacBookPro.local","msg":"Logging in..."}
{"level":30,"time":1623230704129,"pid":43911,"hostname":"MacBookPro.local","msg":"Finding available times for a G exam"}
~
~
~
Hello, I really appreciate the work that's gone into this tool, and I've been able to get it working. However, I'm wondering if it would be possible to alter it to continue checking after going through the list of locations once.
Right now, the tool goes through the list of specified locations, and then closes Chromium if no time slots are found with {"level":50,"time":1628982695093,"pid":1843,"hostname":"MacBook-Pro.local","msg":"No timeslots found"}
displayed in the terminal. I am suggesting adding the option to go back to the beginning of the list of locations and continue checking them throughout that 45-minute session until something comes up. I keep hearing about people who get appointments by chance, randomly checking and a single appointments comes up.
This would be helpful to check smaller centres that don't have a ton of new appointments added in bulk, but only one or two when a cancellation comes up.
(I am running on Mac OS X 10.15.7, but I assume this function would be the same regardless of platform.)
Hi, this is probably a really dumb issue. I am a non-coder but have lately been fed up trying to book a G test manually and I found your project through a Google search.
I downloaded the windows version of your executable. However, when I run it (normally or as admin) a command interface briefly pops up then closes. A blank log file is then created in the directory with the exe.
This sounds like an amazing tool and I would love to be able to use it. Any help would be much appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.