A cross-platform script to book first available time for getting a passport in Sweden - Ett skript som automatiskt bokar pass hos polisen

Overview

Automatic passport booker - Boka pass automatiskt hos Svenska polisen

A cross-platform script to book first available time for getting a passport in Sweden - Ett skript som automatiskt bokar pass hos polisen

Eftersom polisen fortfarande inte har fixat fler tider för att boka pass så kommer detta skript att hitta den första möjliga tiden att boka pass och reservera den. Dock håller de på att att kontinuerligt uppdatera systemet för att motverka dessa typer av automatiserad program och därför kan det när som helst sluta fungera!

User interface Location user interface

Relaterade/liknande projekt:

How to - Instructions for Windows

Download the program with the button below and open it when it's downloaded (can take a while to download and start)

Download icon

If a Windows protected your PC popup appears, click More info then Run anyway

How to - Manual installation instructions (if use don't use Windows)

Note: beware that on Mac you may need to enable extensive permissions to install python, puppeteer or run the script. I don't have a Mac to test on so if you encounter this, Google the error message and how to solve it.

1. Install python:

a. Open terminal

Windows: type powershell in the search bar (lower left corner) then right click on Windows PowerShell and press Run as administrator

Mac: open the terminal, preferably by typing terminal into the spotlight search bar (upper right corner) then select terminal

b. Check if it is already installed

Windows & mac: type python --version then enter, if it displays a python version starting with 3.7 or grater, continue to step 2

c. If not installed (previous output shows that the command was not found)

Install python from official source: https://www.python.org/downloads/
Check the box for Add Python 3.x to PATH if it appears

If you get stuck on this step, search for how to install python for your operating system

2. Install playwright:

Close the terminal/console from step 1.a. and a new one the same way. Then type the following lines one by one and press enter after each one.

Windows:

$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
python -m pip install --upgrade pip
python -m pip install playwright
playwright install firefox

Mac:

python3 -m pip install --upgrade pip
python3 -m pip install playwright
playwright install firefox

3. Download the script (press CTRL+S to save the file, select Downloads folder)

4. Run the script:

Type the following lines one by one into the new terminal/console that you openend in step 2.

Windows:

cd ~/Downloads
python main.py

Mac:

cd ~/Downloads
python3 main.py

5. Follow onscreen instructions and enter the details about your search

6. Wait for a time to become available, a popup will appear (the page reloads itself in the background to search for new times).

Note: if the booking isn't verified/completed manually (entering personal details) after the popup has appeared, it will be lost after some time due to inactivity

7. Optional: force-quit the script anytime by closing the browser or by pressing CTRL+C in the terminal/console (ignore any errors that appear)

Comments
  • To many Calls - Redirected to secondary landing site

    To many Calls - Redirected to secondary landing site

    Hej.

    Först, tack för ett färdigt verktyg för oss som inte riktigt vet vad vi gör när vi klistrar in kommandon i våra linuxburkar :)

    Körde scriptet ett par gånger nu på kvällen och hamnar straxt på : https://reserv.polisen.se/for-manga-anrop/

    Går det kanske att sänka antalet anrop per sekund för att motverka deras sätt att motverka att vanliga människor ska kunna boka en tid för pass :)

    opened by TherisaHaze 12
  • Not even a beginner... sorry

    Not even a beginner... sorry

    Hello, sorry for disturbing and for asking, I know my way around a computer a bit, but know nothing about programming but am desperate for finding a time for passport... I have installed Python 3.10, I think my computer (win10) has Pip, I have installed Playwright (hopefully correct), I have installed Chromium, I have managed to open your file in VS Code and see the text/coding but I am not doing it correct because nothing more happens... becuause I lack the knowledge...

    Is there any possibility you can help me? The "how to" you have written is probably perfect for someone who knows programming but for me its just not enough. Where should I open the script? In VS Code, in CMD, in Python? Or in Playwright or somewhere else? Maybe just a little more information and if possible - with links to where I can find a good easy way to install what I need.

    Hope for the best Skulle vara oerhört tacksam för hjälp med detta! //Tobias

    opened by umanonearth 9
  • Kanske lägg till root.bell() efter rad 162 när en tid hittats

    Kanske lägg till root.bell() efter rad 162 när en tid hittats

    Tack för ett bra script. Jag lyckades få tre tider till tre barn på tre dagar och på sätt sparades en onödig utflykt 40 mil enkel väg (för exfrun - inte för mig... :) ) till Haparanda där det av outgrundlig anledning fanns tider att boka!

    Men jag lyckades aldrig boka med dialogen som ska poppa upp från scriptet. Antingen såg jag den inte för att den låg bakom något fönster, eller så blev det något fel. Minns att jag bl a såg 'Hittad tid är inte längre tillgänglig' några gånger på konsollen.

    Jag lade i alla fall en root.bell() i koden direkt den hittat en tid för att märka det, och sedan såg jag till att ha datorn nära, och vara på tårna, och när den pep till gick jag manuellt till polisens hemsida och bokade. På så sätt bokade jag tiderna. Tyvärr var jag inte helt fokuserad på att felsöka scriptet, mest på att boka passtider! :)

                    if date < last_date:
                        root.bell()
    
    opened by erikrenberg 4
  • error

    error

    C:\Program Files\Python310\python.exe: can't open file 'C:\Users\MALTE\Downloads\main.py': [Errno 2] No such file or directory

    Får detta error vid sista steget. pls halp

    opened by skajagpangadig 3
  • Bank-id....

    Bank-id....

    Hello again, sorry to bother you again - now they have added bank-id to the equation... is there any possibility you have a look if you can do anything to make it work again like you did earlier? Thinking I can do the same as before for my wife if I ask I take a photo of the screen, email her a picture and ask her to scan the qr-code with her phone and then open her bank-id and accept and then your script can start searching every 25th second... or something like that. Would be highly appreciated if possible :) And thanks for your time.

    opened by umanonearth 2
  • scriptet crashar på rad 167 + fix

    scriptet crashar på rad 167 + fix

    Märkte när jag körde scriptet i helgen att det kraschar på rad 167 när en ledig tid hittas. Kanske för att sidan som visas innehåller tomrader på något sätt på just det passkontor jag söke på. Tyvärr debuggade jag inte så jag vet inte exakt när det händer.

    Jag fixade problemet för att komma förbi det på följande sätt:

    if line and line[2] != ":"

    till

    if line and len(line)>2 and line[2] != ":"

    opened by erikrenberg 2
  • IndexError: list index out of range

    IndexError: list index out of range

    Hej,

    Tack för ett bra script. Tyvärr smäller det ganska ofta på nedan.

    Python37>python c:\temp\main.py Traceback (most recent call last): File "c:\temp\main.py", line 111, in <module> options[0], *options).grid(row=0, column=1) IndexError: list index out of range

    Mina parametrar är. personer: 3 tid: 22/06

    OS: win 10 Python: 3.7

    opened by fadern 2
  • Modify again?

    Modify again?

    Hello again this time and sorry to bother you again once again... - something has been added to the equation... So the script sort of dies... is there any possibility you can have yet another look if you can do anything to make it work again like you did earlier? Thinking I can do the same as before for my nephews son if I take a photo of the screen, email him a picture and ask him to scan the qr-code with his phone and then open his bank-id and accept and then your script can start searching every 25th second... or something like that. Would be again and again and again highly appreciated if possible :) And thanks for your time. Again :))

    opened by umanonearth 1
  • blocked Firefox aswell?

    blocked Firefox aswell?

    Hello again,

    the script has been working but I tried to help my friend and now it seems not anymore. Tried it many times (the 1.1.1-version) and it fails. I run the .exe-file, it starts, I choose date and then it opens up a browser and the browser "fills" itself with date and so on but then the script dies - last "transmission" from the promt is "missing radioknappar" or something... Is there any possibilty u have a look? thanks a million so far anyways :)

    opened by umanonearth 1
Releases(v1.3.2)
Owner
Elias Floreteng
Elias Floreteng
Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden

tilesetCopyrighter Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden können fügt je Tileset eine custom-Property tilesetCopyright (string) hi

null 1 Dec 26, 2021
A Telegram Bot which notifies the user when a vaccine is available on CoWin Platform.

Cowin Vaccine Availability Notifier Telegram Bot A bot that notifies the available vaccines at given district in realtime. Introduction • Requirements

Arham Shah 7 Jul 31, 2021
Make your Pass (sanitaire) Fun Again

Make Your Pass (Sanitaire) Fun Again Customize your Pass Sanitaire (French name for EU digital Covide19 Certificate) with colors and images, thus make

null 101 Dec 1, 2022
Battle Pass farming tft bot

Tft bot Bot para farmar pontos do Passe de Batalha do TFT Descrição A cada partida de tft jogada você ganha 100 pontos no passe, porém você não precis

Leonardo Gonçalves 4 Jan 27, 2022
Purpose To make a cloudflare challenge pass successfully, Can be use cf_clearance bypassed by cloudflare

Purpose To make a cloudflare challenge pass successfully, Can be use cf_clearance bypassed by cloudflare, However, with the cf_clearance, make sure you use the same IP and UA as when you got it.

vvanglro 129 Jan 9, 2023
Opensea-upload-with-recaptcha-solution - Updated opensea uploading solution with recaptcha pass

opensea-upload-with-recaptcha-solution updated opensea uploading solution with r

byeonggeon sim 25 Nov 15, 2022
Script to automatically book a vaccine slot on Doctolib for today or tomorrow, following rules from the French Government.

DOCTOSHOTGUN This script lets you automatically book a vaccine slot on Doctolib for today or tomorrow, following rules from the French Government. Pyt

Romain Bignon 560 Dec 19, 2022
A Python Script to automate searching of available vaccination centers in the city and hence booking

Cowin Vaccine Availability Notifier Cowin Vaccine Availability Notifier takes your City or PIN code as an input and automatically notifies you via ema

Jayesh Padhiar 7 Sep 5, 2021
VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers near them.

Introduction VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers

Ankit Tripathi 5 Nov 26, 2021
Script to get a notification when a product, on Amazon Warehouse, is available within a target price

Amazon_Warehouse_Scraping This script aims to scrape Amazon Warehouse and send an email back if there are products whose price matches with the target

null 2 Oct 25, 2021
A Python Script to automate searching of available vaccination centers in the city and hence booking

Cowin Vaccine Availability Notifier Cowin Vaccine Availability Notifier takes your City or PIN code as an input and automatically notifies you via ema

Jayesh Padhiar 7 Sep 5, 2021
And now, for the first time, you can send alerts via action from ArcSight ESM Console to the TheHive when Correlation Rules are triggered.

ArcSight Integration with TheHive And now, for the first time, you can send alerts via action from ArcSight ESM Console to the TheHive when Correlatio

Amir Hossein Zargaran 3 Jan 19, 2022
A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot.

parky's twitch bot A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot. Features ?? Connect to Twitch IRC chat! ?? Conn

Andreas Schneider 10 Dec 30, 2022
You can share your Chegg account for answers using this bot with your friends without getting your account blocked/flagged

Chegg-Answer-Bot You can share your Chegg account for answers using this bot with your friends without getting your account blocked/flagged Reuirement

Ammey Saini 27 Dec 24, 2022
Assassination API for getting random quotes from Assassination Classroom.

Assassination API Take advantage of what you have, while you have it. Quotes from Assassination Classroom Assassination classroom is one of best anime

Swanand Mulay 3 Jul 15, 2022
A course on getting started with the Twitter API v2 for academic research

Getting started with the Twitter API v2 for academic research Welcome to this '101 course' on getting started with academic research using the Twitter

@TwitterDev 426 Jan 4, 2023
A zero-dependency Python library for getting the Kubernetes token of a AWS EKS cluster

tokeks A zero-dependency Python library for getting the Kubernetes token of a AWS EKS cluster. No AWS CLI, third-party client or library (boto3, botoc

Chris Karageorgiou Kaneen 6 Nov 4, 2022
🔪 Block replies to viral tweets from users getting paid to promote useless products

This Tweet Took Off Ublock Origin filter list targeting long reply chains posted by twitter users who get paid to promote random products on viral twe

Xetera 12 Jan 14, 2022
Demonstrate how GitHub OIDC token getting should be included in boto3

boto3 should add direct support for AssumeRoleWithWebIdentity for GitHub Actions There is a aws-actions/configure-aws-credentials action that will get

Ben Kehoe 11 Aug 29, 2022