Giter Club home page Giter Club logo

korprov's Introduction

Bot for Trafikverket time booking site.

Getting a Swedish driving license is hard enough, but the hardest part is trying to find a time for Kunskapsprov and Körprov. The Trafikverket booking site lists time slots available at each location. It is not possible to list available slots at different locations at once, requiring one to go through each location one after the other in order to find a suitable time slot. This bot automatically crawls through all the prefered test locations and lists the earliest available time-slot at each location, making the process of booking time a little easier for the user. This bot doesn't automatically books a time-slot, but only lists earlier available time-slots at given locations.

Prerequisites

  1. Python 3. Installation guide.
  2. Latest version of Google Chrome. Download here.
  3. Corresponding version of Chrome Driver. Download from here. Make sure the Chrome driver version matches the version of Google Chrome installed in your computer.

Installation

  1. CD to the location where you want to install.
  2. Download the repo to the local drive
git clone https://github.com/vaishakk/korprov
  1. Install dependencies
pip3 install -r requirements.txt
  1. Run the script
python run.py -p <personnummer>

Usage:

python run.py [-h] [--pn PN] [--test TEST] [--car CAR] [--loc LOC]
              [--add_config]

Arguments:

  -h, --help            show this help message and exit
  --pn PN, -p PN        The personnummer of the user.
  --test TEST, -t TEST  Test type - Korprov or Kunskapsprov. Default: Korprov
  --car CAR, -c CAR     Car type - Automatbil or Manuellbil. Default: Automatbil. 
                        Only valid for Korprov.
  --loc LOC, -l LOC     Location of test. 
                        Will be ignored if not a valid location.
  --lang LANG, -s LANG  Language of test. Default: Engelska. 
                        Only valid for Kunskapsprov.
  --add_config

Valid Korprov locations
Valid Kunskapsprov locations

Configuration

A permenant configuration can be added by calling the --add_config command

python run.py --add_config -p <personnummer> -t Kunskapsprov -l Farsta -s Svenska

To add many locations to the configuration, run the following command mutiple times until you add all the required locations.

python run.py --add_config -l <location>

Once all the required locations are added to config, you can run

python run.py

to scan through all those locations.

Note: Command line arguments overrides stored configuration.

korprov's People

Contributors

vaishakk avatar

Watchers

 avatar

korprov's Issues

Update location list for theory

Why?

Currently, the same list of locations is used for both exams. Some locations have only one kind of exam.

What?

Create an exclusive list for the theory exam.

Implement command to view current config

Why?

No way to know the currently stored config.

What?

Introduce a new cl arg which would let the user view the currently stored config. Also, display the current config after --add_config command.

implement add_config

Why?

Currently, a user cannot add a permanent configuration.

What?

Implement --add-config action to store input arguments to file.

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.