Since Polisens web queueing solution for getting a passport sucks, and it is more or less impossible to book a time, I wrote this small javascript. What it does is that it automates the searching for a bookable time. In the file you just change the constants to your information and away you go. :)

Overview

Pass für alle

Since Polisens web queueing solution for getting a passport sucks, and it is more or less impossible to book a time, I wrote this small javascript. What it does is that it automates the searching for a bookable time. In the file you just change the constants to your preferred booking dates and away you go. :) More or less.

If the script you have on your computer stops working, make sure to check for updates and download the latest version.

My site about Pass für alle (in Swedish)

Install

  • Download the code to your computer, easiest way is to click here. This is the same file you get when clicking the green Code-button, followed by Download Zip. Extract the zip-file.
  • Go to Tampermonkey and install the addon to your browser.
  • Click the new icon in your browser for Tampermonkey and click Create a new script.
  • Open the pass-fur-alle.js file with a simple text editor like TextEdit, Notepad or something like that.
  • Copy all the code from pass-fur-alle.js and paste it in the Tampermonkey editor in the browser (replacing whatever is there) and save. If you want to change dates or other settings, read more under Settings below.
  • After that, read Run the damn thing.

Settings

In the script there are some constainst that you need to change, they are found under the comment // Constants

Start searching today.

var dateFrom = today();

If you want to start some other day, just change this to a date with the format YYYY-MM-DD, for example:

var dateFrom = '2022-08-24';

The last date you want to search for

var dateTo = '2022-12-24';

Auto confirm time

var autoConfirm = true;

If you don't want to allow auto confirm of found time slot, change to false.

var autoConfirm = false;

Run the damn thing

  • Go to the booking page and click on where you want to book.
  • On step 4, where you search for free slots, the buttons are changed to work for you, instead of you working for the buttons.
  • Click whatever suits you, and the site will try to find you a good slot.
  • When a slot has been found you will hear a bell ring and you can now finish the booking of your time.
Comments
  • Confirm you are a human

    Confirm you are a human

    They just added a text field where you have to type in letters from a picture to confirm you are a human. Is there any way around this? Maybe edit the script so it starts running after you have typed in the letters, which you only have to do one time in the beginning?

    opened by nattzp 57
  • Stuck on first page and won't continue

    Stuck on first page and won't continue

    my latest submission/search doesn't move passed the first page anymore.. It doesn't even hit the "boka tid" button.

    Checking on other computer as well but I think they put something new into place.

    opened by geekteq 26
  • Can't confirm booking. Button's not responding.

    Can't confirm booking. Button's not responding.

    Everything is working fine until I should click "Bekräfta bokning". The button's not responding. A request is being made but I'm not redirected and the booking is NOT confirmed. This is Chrome 100.0.4896.75 on MacOS 12.3.1. Gonna try Firefox next.

    opened by dafvid 17
  • Make it even better

    Make it even better

    Instead of having a time-out of 15 seconds while searching for the nearest date it should be possible to instead refresh the page since one will never get "you have made too many "nearest-time-searches" within a certain time" - error in that case.

    Also, when the script does find a new time, it seem to only "highlight" the time, it should move forward to the "next page" since the mutex seems to be obtained when the "next page" is pressed.

    opened by j1MP 15
  • Replaced Cookie with localStorage

    Replaced Cookie with localStorage

    Based on the comment on issue 62 I tested to replace Cookie with localStorage which seems to work. Tested with a late date to verify that it selects a time for booking.

    opened by haegg78 14
  • too many redirects

    too many redirects

    Även med det nya cookie-tillägget får jag felmeddelande:

    Sidan fungerar inte bokapass.nemoq.se omdirigerade dig för många gånger. [Testa att rensa cookies] (https://support.google.com/chrome?p=rl_error&hl=sv).

    ERR_TOO_MANY_REDIRECTS

    Har såklart rensat cookies. Någon som har fått det att fungera?

    opened by Anxinwonderland 14
  • Issue running in WSL

    Issue running in WSL

    I followed you guide for Windows but got this error, any ideas?

    :/mnt/c/temp/passfuralle$ python3 pass-fur-alle.py
    Traceback (most recent call last):
      File "pass-fur-alle.py", line 12, in <module>
        web = webdriver.Chrome()
      File "/home/gustav/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
        super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
      File "/home/gustav/.local/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 90, in __init__
        self.service.start()
      File "/home/gustav/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
        self.assert_process_still_running()
      File "/home/gustav/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 110, in assert_process_still_running
        raise WebDriverException(
    selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1
    
    opened by Tjawkis 10
  • Error 801

    Error 801

    I'm using the latest version of the script, but cannot get into the site without getting the 801 error, see below. I'm on a Windows computer, running Chrome. Any ideas on how to solve this? (Have cleared cache and cookies before trying)

    error801

    opened by HoneySue1337 8
  • Appreciation thread / Tråden för inbördes beundran

    Appreciation thread / Tråden för inbördes beundran

    Inget issue. Vill bara säga tack! Tycker vi saknar en tråd för inbördes beundran där vi tackar både jonkpirateboy och alla andra som fixar eventuella problem som uppstår.

    Jag fixade precis en tid åt en äldre granne som knappt löser det tekniska överhuvudtaget, efter att ha skrattat en stund åt uttalandet "är det inte bara att gå ned och ta en nummerlapp? Så brukade det vara, men det är nog många år sedan nu..." (Vi bor i huset mittemot passpolisen här, men får ingen förtur för det. Dålig grannsamverkan...)

    Så, ja... TACK! Ni är bäst!

    opened by ispjstfu 7
  • Manual fixes for verification steps added

    Manual fixes for verification steps added

    Added a manual step to stop the script so that the verification can be solved by a human before moving on to the booking area. Makes the original script work like before after the verification is solved.

    opened by ispjstfu 6
  • When using firstDate = true, after some time a time is booked way after endBookingDate

    When using firstDate = true, after some time a time is booked way after endBookingDate

    Using

    startBookingDate = "2022-03-31"
    endBookingDate = "2022-08-15"
    firstDate = True
    

    This runs for a while, and then suddenly I get a time booked for 2022-11-09. This has happened three times. It seems like after a while, the first available time is booked regardless of the endBookingDate condition. I haven't managed to understand why if formInputDateTime > endBookingDateDateTime is suddenly false for 2022-11-09 > 2022-08-15, the only explanation I can think of is that formInputDateTime is incorrectly parsed into an empty string or something like that?

    opened by henhal 6
  • Session ended because of inactivity

    Session ended because of inactivity

    After waiiting a while, maybe 10-15 minutes, and clicking "Avbryt", I end up on a page showing "Felmeddelande: Din session har avslutats på grund av inaktivitet.". Is the search really going on in the background or has the session ended without the script detecting it and waiting indefinitely without searching?

    opened by levsa 0
Owner
Johan Jonk Stenström
Johan Jonk Stenström
Feel free to create new file, don't hesitate to pull your code, the most important thing is that the file name here must match your nickname so that file does not conflict with other people.

Hacktoberfest Indonesia Apa Itu Hacktoberfest ? Hacktoberfest adalah acara tahunan yang bertujuan untuk mendorong berkontribusi kedalam ekosistem open

Juan Daniel 5 Dec 15, 2022
AweSome Book App displays the book details entered by user and saves the information in Local storage. User can add and remove a book title/author to the library and from the library.

Awesome Book App with ES6 Used npm init -y command to create package.json file. Created the entry point for the JavaScript code called index.js Create

Krishna Prasad Acharya 8 Aug 15, 2022
a temporary solution to revert to the old ui. the new ui was put into effect since april

Revert-YouTube-UI a temporary solution to revert to the old ui. the new ui was put into effect since april and is slowly rolling out to users. Feature

a person 8 May 10, 2023
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
Less clicking, more creating. Navigate to your favorite actions on the websites you love with just one click.

Navigate to your favorite actions on the websites you love with just one click Web https://irtaza9.github.io/awesome-shortcuts/ Available Shortcuts Go

Irtaza Hussain 9 Aug 25, 2022
This is a single page web application that keeps tracks of books. Book details captured are the book title, author and ISBN. User can add a book, view a list of books and also remove any un wanted books.

Project Name This is a single page web application that keeps tracks of books. Book details captured are the book title, author and ISBN. User can add

Olivier 6 Nov 20, 2022
👌A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for drop an annoying pop-ups confirming the submission of form in your web apps.

Throw out pop-ups confirming the submission of form! A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for dro

Vic Shóstak 35 Aug 24, 2022
Emoji - Use emoji names instead of Unicode strings. Copy-pasting emoji sucks.

Grammy Emoji Adds emoji parsing for grammY. Check out the official documentation for this plugin. While this draft is working, we still do not recomme

null 8 Sep 5, 2022
You view the Twitch channel chat and you can access the details of the users who wrote during the viewing period.

Twitch Chat Web Page You view the Twitch channel chat and you can access the details of the users who wrote during the viewing period. Getting Started

Mert 6 Dec 13, 2022
Awesome Books project : An online Book Library. Storing book information using local storage and displaying it as a list on HTML page

This is project is my based on building an online Book Library. Storing book information using local storage and displaying it as a list on html page

Richard Chileya 7 Nov 11, 2022
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021
AdsPower supports Local API, which has functions like reading and writing account configuration information, opening and closing browsers, searching for accounts.

AdsPower supports Local API, which has functions like reading and writing account configuration information, opening and closing browsers, searching for accounts. Besides, it can cooperate with Selenium and Puppeteer to execute browser operations automatically.

AdsPower Official 20 Dec 1, 2022
Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)

Who is the Creator ? The creator of this plugin is DevilBro I have completely reworked the plugin so that it can use the BDFDB library from DevilBro !

Flavien 18 Dec 29, 2022
Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)

ShowHiddenChannels Plugin Returns DevilBro, author of this plugin, and BetterDiscord developers have deleted ShowHiddenChannels plugin from the offici

NotCapengeR 177 Sep 17, 2022
A showcase of problems once hard or impossible to solve with CSS alone, now made trivially easy with Flexbox.

Solved by Flexbox A showcase of problems once hard or impossible to solve with CSS alone, now made trivially easy with Flexbox. View Site Viewing the

Philip Walton 13k Jan 2, 2023
auto-vote-topgg automates voting for bots on top.gg using google chrome!

auto-vote-topgg auto-vote-topgg automates voting for bots on top.gg using google chrome! uses your account thats already logged into top.gg you must b

Anonymous 2 Jan 29, 2022
A Stacks DeFi app that automates covered call writing to generate sustainable, risk-adjusted yield.

?? Options Vault ?? A Stacks DeFi app that automates covered call writing to generate sustainable, risk-adjusted yield. Options vaults allow you to al

null 15 Nov 16, 2022
docsQL - Getting an overview over your Markdown file in your Jamstack site

docsQL Getting an overview of your Jamstack Markdown files. Demo Play with: https://peterbe.github.io/docsql/ You're supposed to run docsQL with your

Peter Bengtsson 19 Jan 3, 2023
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022