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!
- jonkpirateboy/Pass-fur-alle - has automatic booking confirming feature
 - kalkih/passport-appointment-bot - has prebuilt executables, SUPER easy to install (check this out if you have any problems with the others)
 - This project - has graphical interface for parameter selection
 
Download the program with the button below and open it when it's downloaded (can take a while to download and start)
If a Windows protected your PC popup appears, click More info then Run anyway
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.
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
Windows & mac: type python --version then enter, if it displays a python version starting with 3.7 or grater, continue to step 2
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
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 firefoxMac:
python3 -m pip install --upgrade pip
python3 -m pip install playwright
playwright install firefox3. Download the script (press CTRL+S to save the file, select Downloads folder)
Type the following lines one by one into the new terminal/console that you openend in step 2.
Windows:
cd ~/Downloads
python main.pyMac:
cd ~/Downloads
python3 main.py6. 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

