Code Monkey home page Code Monkey logo

passport-appointment-bot's Introduction

passport-appointment-bot 🛂🤖

Bot to automatically find and book an appointment for renewal/creation of a Swedish passport or national identity card.

Bott som automatiskt söker och bokar första lediga tid för att förnya pass eller nationellt id kort.

⚠️ For educational use only ⚠️

What does it do?

The bot searches for available appointments until one is found, it then tries to book the appointment. The bot will run until an appointment is successfully booked.
The bot can be configured to search for appointments in a specific region & in one or more cities at a time.
It can also be configured to run several concurrent booking sessions in order to increase searching speed & search multiple locations at the same time.

How to run

Requires Google Chrome

Download config.json & passport-appointment-bot for your OS from the latest release, place them in the same folder.

  1. Edit the configuration file you downloaded (config.json) with text editor of choice, see Configuration for option descriptions
  2. Run the executable you downloaded passport-appointment-bot
  3. The bot will open a webpage where the user is required to solve a captcha in order to proceed
  4. The bot will search until an appointment is found
  5. The bot will once again open a webpage where the user is required to solve a captcha in order to proceed
  6. The bot will proceed with the booking and a booking confirmation should be sent to the configured email and will also be displayed in the program

Run from source

Requires Google Chrome
Requires Nodejs (Tested on v17.7.1)

  1. Clone the project, install dependencies with npm install
  2. Edit configuration values in config.json, see Configuration for option descriptions
  3. Run the bot with npm start
  4. The bot will open a webpage where the user is required to solve a captcha in order to proceed
  5. The bot will search until an appointment is found
  6. The bot will once again open a webpage where the user is required to solve a captcha in order to proceed
  7. The bot will proceed with the booking and a booking confirmation should be sent to the configured email and will also be displayed in the console

Configuration

All options are required

Option Required Description
region Desired region, see Supported Regions & Locations
locations One or more cities/locations, see Supported Regions & Locations
max_date Latest date to search for appointment (will search all days in the week of the specified date)
min_date Earliest date to search for appointment (will search all days in the week of the specified date)
email Your email (confirmation email will be sent to this address)
phone Your phone number
firstname Your first name, or several firstnames if booking for more than one person e.g. (["John", "Jane"])
lastname Your last name, or several lastnames if booking for more than one person e.g. (["Doe", "Doe"])
passport Set to true if the booking appointment is for passport, else false.
id Set to true if the booking appointment is for national identity card, else false.
sessions Number of concurrent booking sessions to run, higher number equals faster checking of available times and opens up for checking several locations in parallel, (will still only book one appointment in the end) (max 6)
throttle Add a timeout (in seconds) between searches

Good to know

  • Only one appointment can be booked per email and phone number.
  • Both passport & national identity card can be renewed in one appointment, both options can therefore be set to true.
  • Searching for appointment for more than one person at a time requires a longer appointment time and are thus harder to find.
  • A maximum of 8 people can be booked in one appointment

Related projects

Supported Regions & Locations

Supported regions & locations can also be found in the src/locations.js file.

Blekinge

  • Karlshamn
  • Karlskrona

Dalarna

  • Avesta
  • Borlänge
  • Ludvika
  • Mora

Gotland

  • Visby

Gävleborg

  • Bollnäs
  • Gävle
  • Hudiksvall

Halland

  • Falkenberg
  • Halmstad
  • Kungsbacka
  • Varberg

Jämtland

  • Funäsdalen
  • Strömsund
  • Sveg
  • Åre
  • Östersund

Jönkoping

  • Eksjö
  • Jönköping
  • Värnamo

Kalmar

  • Kalmar
  • Oskarshamn
  • Västervik

Kronoberg

  • Ljungby
  • Växjö
  • Älmhult

Norrbotten

  • Arvidsjaur
  • Boden
  • Gällivare
  • Haparanda
  • Kalix
  • Kiruna
  • Luleå
  • Piteå

Skåne

  • Eslöv
  • Helsingborg
  • Hässleholm
  • Klippan
  • Kristianstad
  • Landskrona
  • Lund
  • Malmö
  • Trelleborg
  • Ystad
  • Ängelholm

Stockholm

  • Flemingsberg
  • Globen
  • Haninge
  • Järva
  • Nacka
  • Norrtälje
  • Sollentuna
  • Solna
  • Sthlm City
  • Södertälje
  • Södra Roslagen

Södermanland

  • Eskilstuna
  • Katrineholm
  • Nyköping
  • Skavsta
  • Strängnäs

Uppsala

  • Enköping
  • Tierp
  • Uppsala
  • Östhammar

Värmland

  • Arvika
  • Karlstad
  • Kristinehamn
  • Torsby

Västerbotten

  • Lycksele
  • Skellefteå
  • Storuman
  • Umeå
  • Vilhelmina

Västernorrland

  • Härnösand
  • Kramfors
  • Sollefteå
  • Sundsvall
  • Ånge
  • Örnsköldsvik

Västmanland

  • Fagersta
  • Köping
  • Sala
  • Västerås

VästraGötaland

  • Alingsås
  • Borås
  • Falköping
  • Göteborg
  • Lidköping
  • Mariestad
  • Mark/Kinna
  • Mölndal
  • Skövde
  • Stenungsund
  • Strömstad
  • Trollhättan
  • Uddevalla
  • Ulricehamn
  • Åmål

Örebro

  • Hallsberg
  • Karlskoga
  • Lindesberg
  • Vivalla
  • Örebro

Östergötland

  • Linköping
  • Motala
  • Norrköping

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.