drivetest-ca-availabilities

所属分类:其他
开发工具:TypeScript
文件大小:106KB
下载次数:0
上传日期:2023-03-06 02:19:34
上 传 者sh-1993
说明:  Node.js脚本,用于查看安大略省各地驾驶考试中心的可用日期
(A Node.js script for seeing which dates are available for driving test centers around Ontario)

文件列表:
.eslintignore (129, 2023-08-09)
.eslintrc.json (846, 2023-08-09)
.husky (0, 2023-08-09)
.husky\pre-commit (58, 2023-08-09)
.prettierignore (66, 2023-08-09)
.prettierrc.json (59, 2023-08-09)
LICENSE (1070, 2023-08-09)
cli (0, 2023-08-09)
cli\api (0, 2023-08-09)
cli\api\interfaces (0, 2023-08-09)
cli\api\interfaces\dates.ts (633, 2023-08-09)
cli\api\interfaces\index.ts (54, 2023-08-09)
cli\api\interfaces\locations.ts (1760, 2023-08-09)
cli\cli.ts (3122, 2023-08-09)
cli\cliPkg.ts (4087, 2023-08-09)
cli\evaluate.ts (391, 2023-08-09)
cli\logger.ts (512, 2023-08-09)
cli\main.ts (6599, 2023-08-09)
cli\scraper.ts (12054, 2023-08-09)
config.json.example (250, 2023-08-09)
package.json (2004, 2023-08-09)
pkg.config.json (156, 2023-08-09)
store (0, 2023-08-09)
store\availabilities (0, 2023-08-09)
store\availabilities\availabilities.query.ts (1987, 2023-08-09)
store\availabilities\availabilities.service.ts (952, 2023-08-09)
store\availabilities\availabilities.store.ts (534, 2023-08-09)
store\availabilities\availability.model.ts (1015, 2023-08-09)
store\availabilities\index.ts (208, 2023-08-09)
store\options (0, 2023-08-09)
... ...

# drivetest.ca availabilities ## This is no longer being maintained This CLI tool written in Node.js will log in to [Ontario's driving test booking system](https://drivetest.ca), search for all the available dates and times for all locations within a given search radius (default is 20km). Once it finds some available times, it will write them to the terminal. I worked on this tool during some of my spare time because I found it difficult to find open spots for driving tests due to the way the website was designed. It uses [Puppeteer](https://github.com/puppeteer/puppeteer) to walk through the website and extract information as if it was a regular user (with some rate-limiting as to not overload the website with requests). Buy Me A Coffee ## Using the prebuilt binary You can find a prebuilt binary in the Releases section with a list of the options below that you will need to pass (the ones that have a default are optional). On the first run, the script will download a compatible version of Chrome/Chromium to retrieve the information but after that, it'll reuse the downloaded instance (unless I decide to use an updated revision in a future update). ``` $ .\drivetest-availabilities-win.exe -h $ ./drivetest-availabilities-linux -h $ ./drivetest-availabilities-macos -h Usage: cli [options] Options: -r, --radius search radius in kilometers from where you are (default: 20) -l, --location your current location expressed in "latitude,longitude" (eg. 43.***2***45,-79.3871***5). -m, --months Number of months to look ahead (default: 6) --licenseType License type exam to search for --email Email to log in with --licenseNumber License number to log in with --licenseExpiry License expiry date expressed in "YYYY/MM/DD" to log in with --chromiumPath Path to Chromium-based browser executable. If option not used, Chromium will be downloaded to this folder. -h, --help display help for command ``` ## Building from source ### Prerequisites - Node.js 14+ (active LTS at time of writing) - [yarn classic](https://classic.yarnpkg.com/en/docs/install) (npm can be used but yarn is recommended since there's a yarn.lock file included) ### Steps 1. Install necessary dependencies by running `yarn install` 2. Compile the Typescript files to Javascript by running `yarn build` 3. Rename config.json.example to config.json, fill in all the empty fields and remove the comments from the file. However, if you want to pass the details manually as CLI arguments, you can leave the fields empty. 4. Start the script by running `yarn start` and passing in the required arguments (and any optional ones, if you wish) ### Creating your own executables After following the steps above, if you wish to create your own executable off of this, just run `yarn package`.

近期下载者

相关文件


收藏者