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
Simple Telegram bot to confess to your crush this Valentine's Day

Simple Telegram bot to confess to your crush this Valentine's Day! Steps pip install python-telegram-bot Register a Telegram bot & get the token by fo

3 Mar 18, 2022
An youtube videos thumbnail downloader telegram bot.

YouTube-Thumbnail-Downloader An youtube videos thumbnail downloader telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT L

Fayas Noushad 40 Oct 21, 2022
Python package for agilex robotics mobile base platform

This is Python API for Agilex Robotics Mobile base This is a python API for Can communication with Agilex Robotics Mobile base and controlling it. Sup

7 Sep 06, 2022
Yet another discord-BOT

Note I have not added comments to the initial code as it is for my educational purpose. Use This is the code for a discord-BOT API py-cord-2.0.0a4178+

IRONMELTS 1 Dec 18, 2021
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music

SHU KURENAI TEAM 4 Nov 05, 2022
A wrapper to stream information from Twitter's Full-Archive Search Endpoint

A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.

Daniela Pinto Veizaga 9 Nov 28, 2022
Photogrammetry Web API

OpenScanCloud Photogrammetry Web API Overview / Outline: The OpenScan Cloud is intended to be a decentralized, open and free photogrammetry web API. T

Thomas 86 Jan 05, 2023
Python package and CLI for user-friendly integration with SAS Viya

sasctl A user-friendly Python interface for SAS Viya. Full documentation: https://sassoftware.github.io/python-sasctl Table of Contents Overview Prere

SAS Software 30 Dec 14, 2022
An Python SDK for QQ based on mirai-api-http v2.

Argon 一个基于 graia-broadcast 和 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 The Stasis / 停滞 为维持 GraiaProject

BlueGlassBlock 1 Oct 29, 2021
This is an Advanced Calculator maybe with Discord Buttons in python.

Welcome! This is an Advanced Calculator maybe with Discord Buttons in python. This was the first version of the calculator, made for my discord bot, P

Polsulpicien 18 Dec 24, 2022
Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Sachit 142 Jan 07, 2023
Twitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-reddit-bot

Ace Attorney twitter Bot Twitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-

Luis Mayo Valbuena 542 Dec 17, 2022
MashaRobot : New Generation Telegram Group Manager Bot (🔸Fast 🔸Python🔸Pyrogram 🔸Telethon 🔸Mongo db )

MashaRobot Me On Telegram ✨ MASHA ✨ This is just a demo bot.. Don't try to add to your group.. Create your own bot How To Host The easiest way to depl

Mr Dark Prince 40 Oct 09, 2022
Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters.

Instagram_bot (필자를 포함한) 모든 대한민국 훈련병들을 위한 인스타그램 인편지기입니다. Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters. 들어가기 (Ge

Lee, Jongjun 2 Nov 21, 2021
A melhor maneira de atender seus clientes no Telegram!

Clientes.Chat Sobre o serviço Configuração Banco de Dados Variáveis de Ambiente Docker Python Heroku Contribuição Sobre o serviço A maneira mais organ

Gabriel R F 10 Oct 12, 2022
Projeto do segundo módulo da Resilia

@ Projeto Resilia : Módulo 2 Vamos jogar Forca ! O jogo da forca é um jogo em que o jogador tem que acertar qual é a palavra proposta, tendo como dica

Mateus Sartorio 2 Feb 24, 2022
This is a music bot for discord written in python

this is a music bot for discord written in python, it is designed for educational use ONLY, I do not take any responsibility for uses outside of educational use

5 Dec 24, 2021
Just a python library to make reddit post caching easier

Reddist Just a python library to make reddit post caching easier. Caching Options In Memory Caching Redis Caching Pickle Caching Usage Installation: D

Samrid Pandit 3 Jan 16, 2022
This is a Innexia Group Manager Bot with many features

⚡ Innexia ⚡ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon... Available on Telegram as @Innexia ❤️ Suppor

TeamDeeCode 84 Jun 04, 2022
A multi-platform HTTP(S) Reverse Shell Server and Client in Python 3

Phantom - A multi-platform HTTP(S) Reverse Shell Server and Client Phantom is a multi-platform HTTP(S) Reverse Shell server and client in Python 3. Bi

85 Nov 18, 2022