Code Monkey home page Code Monkey logo

drivetest-ca-availabilities's People

Contributors

dependabot[bot] avatar saahiljaffer avatar silverandroid 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

Watchers

 avatar  avatar  avatar  avatar

drivetest-ca-availabilities's Issues

Ability to keep checking more than once?

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.)

Latest version errors out

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:

  1. Downloaded latest binary from release notes
  2. Did chmod a+x to make the binary executable
  3. Gave Apple security permission to run the binary anyway
  4. Then ran this command ./drivetest-availabilities-macos -r 60 -l “xx.xxxxxx, -xx.xxxxxx” --licenseType G --email [email protected] --licenseNumber Bxxxx-xxxxx-xxxxxx --licenseExpiry “xxxx/xx/xx”
  5. And getting above error

Expected behavior
Get some kind of valid output

Desktop (please complete the following information):

  • macOS 11.3.1

CLI Arguments not working with npm

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?

Didn't go through G EXAM

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"}
~
~
~

Recaptch issue

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

Location error

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.

Does not seem to work anymore

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

Instance exits immediately after logging in

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?

Does this still work?

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.

TypeError: Cannot read property 'url' of undefined

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:

  1. Start with the command line above and wait for some time in the waiting room
  2. See error

Expected behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge 92.0.902.67

Unexpected token in JSON

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

Incorrect results

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.

Recaptcha issue

I am facing recaptcha issue. May I know is there any fix or something I am missing.

Hang after click login button

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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):

  • OS: [e.g. Windows 10]

Program opens then immediately shuts down, empty log

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.

Infinite scrolling

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!

No dates written to terminal

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.

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.