GithubHelp home page GithubHelp logo

jonkpirateboy / pass-fur-alle Goto Github PK

View Code? Open in Web Editor NEW
378.0 378.0 98.0 73 KB

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. :)

License: GNU General Public License v3.0

JavaScript 100.00%
javascript passport tampermonkey

pass-fur-alle's People

Contributors

granstubbe avatar haegg78 avatar hoeoek avatar iampelle avatar jonkpirateboy avatar matias-sandell avatar maxramqvist avatar mendi-git avatar mrkjell avatar nonameformee avatar nrkljo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pass-fur-alle's Issues

ERR TO MANY REDIRECTS

Tack för scriptet! Det funkade perfekt för den första personen jag skulle boka åt, men nu får jag felmeddelande:
Sidan fungerar inte

bokapass.nemoq.se omdirigerade dig för många gånger.
Testa att rensa cookies.
ERR_TOO_MANY_REDIRECTS

Det hjälper inte att rensa cookies.
Har de hittat ett sätt att stoppa pass-fur-alle.js också nu ?

WSL kan inte hitta den nedladdade filen chromedriver

Laddade ner rätt version av chromedriver, men när jag försöker fortsätta med commandot i windows hjälpen å hittas inte chromedriver av terminalen. Vad är det för fel? jag har extractat filen in min downloads (även kallad hämtade filer). Har testat både:
sudo mv -f ~/Downloads/chromedriver /usr/local/share/
och
sudo mv -f ~/Hämtade-filer/chromedriver /usr/local/share/

men får
mv: cannot stat '/root/chromedriver': No such file or directory
vad jag än testar

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.

Cannot find button

When setting firstDate to true, I get this error message after ctrl+c: Unable to locate element: //*[contains(@aria-label,"202")]
And when inspecting the webpage I can't seem to find an element with "202"...
Does anyone else have this problem?

För många anrop

Du har gjort för många anrop till polisen.se under en kort tid. Ditt besök har dirigerats till vår reservwebbplats.
Notera att du inte får tillgång till fler tider för att ansöka om pass och nationellt id-kort genom att ringa 114 14 eller besöka polisens receptioner. De tider som finns tillgängliga hittar du på bokningssidorna. Tack för ditt tålamod.

bara jag som fick upp detta??

I'm getting an error message when installing Selenium

Hi
I'm getting an error message when installing Selenium... Does anyone have any idea why I get this? "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5ihwbgpi/cryptography/"
Here is the whole output (where the error-message is):
"
Using cached https://files.pythonhosted.org/packages/10/a7/51953e73828deef2b58ba1604de9167843ee9cd4185d8aaffcb45dd1932d/cryptography-36.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-5ihwbgpi/cryptography/setup.py", line 84
print(f" Python: {'.'.join(str(v) for v in sys.version_info[:3])}")
^
SyntaxError: invalid syntax
"
the ^ is under the "-mark in " ... version_info[:3])}") "
I also get a warning about using an older version of pip ("pip version 8.1.1"), might that be causing this error?

Cross-linking

I have created a similar script to yours, before even knowing about the one you made and they solve slightly different use cases. It would probably be helpful for everyone to cross-link these repositories.

Here is the script I made: https://github.com/elias123tre/passport_booker_se
It uses playwright (from Microsoft, by puppeteer developers) instead of selenium to minimize dependencies and manage installation with just one command and uses a graphical interface with Tkinter to ask the user about booking time, nr of people etc.

Feel free to add a link to my repo in your readme if it sounds interesting, I've already linked to yours from mine.

Ditt skript verkar riktigt bra och bland annat auto-bokning vilket är väldigt smidigt
Keep it up och Tack!

Suggestion: Obfuscate the code before releasing

I think I'm not the only one that thinks the people behind the booking website are actively watching this repository in order to see what solutions you come up with to then patch them. Maybe it would be a better idea to obfuscate "working" versions so that they can't see how it was fixed?

Län and Expedition

Hi,
I can't get It to work when it comes for me to select län and expedition..
In terminal I type Län: Skåne and Expedition: Lund, but I get error page in Google Chrome.

Anyone else having the same issue?

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?

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

Enhancment suggestion: read names from file

Reading the names from an input file would be a good way to separate code and data.

That way you don't have to modify the pass-fur-alle.py each time you you run a "git pull"

thanks for a good program! ;)

Available time are not available.

I get hits at different times but when I click (fast as hell) they are not available. Does it not work to do as before? To enter so the system does so you move on. That is, it automatically adds name + email + phone. (Auto confirm)

Or it may not work in this version

Javascript detection to "block" webdriver...

Deobfuscated a bit to make it more readable. They're searching for certain things in the list it seems and if found redirect to the "too many requests page"

function kylem() {
var divinity = ["search", "3395712uZfiKM", "warn", "trace", "prototype", "39154yuFujg", "6042wFTljF", "5551WVmare", "length", "(((.+)+)+)+$", "3940944DQrEtk", "error", "1361315mPSHMG", "517920NZjwLG", "href", "7176609eYKDDi", "toString", "console", "table", "12rSdmgF", "proto", "constructor", "https://reserv.polisen.se/for-manga-anrop", '{}.constructor("return this")( )', "bind", "webdriver"];
kylem = function () {
return divinity;
};
return kylem();
}

Question is what it's finding with pass-fur-alle and can we hide that?

Står still

Efter man kör scriptet och väljer län och/eller utan stad så händer inget mer än att den startar browser och kommer till länets sida.
"Chrome is being controlled by automated test software."
https://bokapass.nemoq.se/Booking/Booking/Index/halland

lla län: https://polisen.se/tjanster-tillstand/pass-och-nationellt-id-kort/boka-tid-hitta-passexpedition/
Välj län. Sista delen av url t ex 'halland'. Eller tryck enter för Skåne: halland
Välj expedition. T ex 'Halmstad'. Eller tryck enter för hela länet: kungsbacka
Län: halland
Expedition: kungsbacka

clear builtins._

clear sys.path

clear sys.argv

clear sys.ps1

clear sys.ps2

clear sys.last_type

clear sys.last_value

clear sys.last_traceback

clear sys.path_hooks

clear sys.path_importer_cache

clear sys.meta_path

clear sys.interactivehook

restore sys.stdin

restore sys.stdout

restore sys.stderr

cleanup[2] removing sys

cleanup[2] removing builtins

cleanup[2] removing _frozen_importlib

cleanup[2] removing _imp

cleanup[2] removing _warnings

cleanup[2] removing _frozen_importlib_external

cleanup[2] removing _io

cleanup[2] removing marshal

cleanup[2] removing posix

cleanup[2] removing _thread

cleanup[2] removing _weakref

cleanup[2] removing time

cleanup[2] removing zipimport

cleanup[2] removing _codecs

cleanup[2] removing codecs

cleanup[2] removing encodings.aliases

cleanup[2] removing encodings.cp437

cleanup[2] removing encodings

cleanup[2] removing encodings.utf_8

cleanup[2] removing _signal

cleanup[2] removing main

destroy main

cleanup[2] removing encodings.latin_1

cleanup[2] removing _abc

cleanup[2] removing abc

cleanup[2] removing io

cleanup[2] removing _stat

cleanup[2] removing stat

cleanup[2] removing _collections_abc

cleanup[2] removing genericpath

cleanup[2] removing posixpath

cleanup[2] removing os.path

cleanup[2] removing os

cleanup[2] removing _sitebuiltins

cleanup[2] removing site

destroy site

cleanup[2] removing selenium

destroy selenium

cleanup[2] removing selenium.webdriver.firefox

cleanup[2] removing types

cleanup[2] removing enum

cleanup[2] removing _sre

cleanup[2] removing sre_constants

destroy sre_constants

cleanup[2] removing sre_parse

cleanup[2] removing sre_compile

cleanup[2] removing _operator

cleanup[2] removing operator

cleanup[2] removing keyword

destroy keyword

cleanup[2] removing _heapq

cleanup[2] removing heapq

cleanup[2] removing itertools

cleanup[2] removing reprlib

destroy reprlib

cleanup[2] removing _collections

cleanup[2] removing collections

cleanup[2] removing _functools

cleanup[2] removing functools

cleanup[2] removing _locale

cleanup[2] removing copyreg

cleanup[2] removing re

cleanup[2] removing _struct

cleanup[2] removing struct

cleanup[2] removing binascii

cleanup[2] removing base64

cleanup[2] removing fnmatch

cleanup[2] removing errno

cleanup[2] removing zlib

cleanup[2] removing warnings

cleanup[2] removing _compression

cleanup[2] removing _weakrefset

destroy _weakrefset

cleanup[2] removing threading

cleanup[2] removing _bz2

cleanup[2] removing bz2

cleanup[2] removing _lzma

cleanup[2] removing lzma

cleanup[2] removing pwd

cleanup[2] removing grp

cleanup[2] removing shutil

cleanup[2] removing contextlib

cleanup[2] removing collections.abc

cleanup[2] removing typing

destroy typing

cleanup[2] removing importlib._bootstrap

cleanup[2] removing importlib._bootstrap_external

cleanup[2] removing importlib

cleanup[2] removing importlib.machinery

cleanup[2] removing importlib.abc

cleanup[2] removing importlib.util

cleanup[2] removing zipfile

cleanup[2] removing selenium.webdriver.common

cleanup[2] removing selenium.webdriver.common.desired_capabilities

cleanup[2] removing selenium.webdriver.remote

cleanup[2] removing weakref

cleanup[2] removing copy

cleanup[2] removing pkgutil

cleanup[2] removing selenium.webdriver.remote.bidi_connection

cleanup[2] removing selenium.webdriver.remote.command

cleanup[2] removing selenium.common.exceptions

cleanup[2] removing selenium.common

destroy selenium.common

destroy selenium.common.exceptions

cleanup[2] removing selenium.webdriver.remote.errorhandler

cleanup[2] removing selenium.types

destroy selenium.types

cleanup[2] removing _socket

cleanup[2] removing math

cleanup[2] removing select

cleanup[2] removing selectors

cleanup[2] removing socket

cleanup[2] removing selenium.webdriver.common.keys

cleanup[2] removing selenium.webdriver.common.utils

cleanup[2] removing selenium.webdriver.remote.file_detector

cleanup[2] removing selenium.webdriver.remote.mobile

cleanup[2] removing token

destroy token

cleanup[2] removing tokenize

cleanup[2] removing linecache

cleanup[2] removing traceback

cleanup[2] removing _string

cleanup[2] removing string

cleanup[2] removing atexit

cleanup[2] removing logging

cleanup[2] removing _bisect

cleanup[2] removing bisect

destroy bisect

cleanup[2] removing _sha512

cleanup[2] removing _random

cleanup[2] removing random

cleanup[2] removing tempfile

cleanup[2] removing ntpath

cleanup[2] removing urllib

cleanup[2] removing urllib.parse

cleanup[2] removing pathlib

destroy pathlib

cleanup[2] removing importlib.resources

cleanup[2] removing certifi.core

cleanup[2] removing certifi

cleanup[2] removing future

destroy future

cleanup[2] removing urllib3.packages

cleanup[2] removing urllib3.packages.six

cleanup[2] removing urllib3.packages.six.moves

cleanup[2] removing http

cleanup[2] removing email

cleanup[2] removing email.errors

cleanup[2] removing email.quoprimime

cleanup[2] removing email.base64mime

cleanup[2] removing quopri

cleanup[2] removing email.encoders

cleanup[2] removing email.charset

cleanup[2] removing email.header

cleanup[2] removing _datetime

cleanup[2] removing datetime

cleanup[2] removing locale

cleanup[2] removing calendar

cleanup[2] removing email._parseaddr

cleanup[2] removing email.utils

cleanup[2] removing email._policybase

cleanup[2] removing email.feedparser

cleanup[2] removing email.parser

cleanup[2] removing uu

cleanup[2] removing email._encoded_words

cleanup[2] removing email.iterators

cleanup[2] removing email.message

cleanup[2] removing _ssl

cleanup[2] removing ssl

cleanup[2] removing http.client

cleanup[2] removing urllib3.packages.six.moves.http_client

cleanup[2] removing urllib3.exceptions

cleanup[2] removing urllib3._version

cleanup[2] removing urllib3.contrib

cleanup[2] removing urllib3.contrib._appengine_environ

cleanup[2] removing urllib3.util.wait

cleanup[2] removing urllib3.util.connection

cleanup[2] removing urllib3.util.request

cleanup[2] removing urllib3.util.response

cleanup[2] removing urllib3.util.retry

cleanup[2] removing _hashlib

cleanup[2] removing _blake2

cleanup[2] removing _sha3

cleanup[2] removing hashlib

cleanup[2] removing hmac

cleanup[2] removing urllib3.util.url

cleanup[2] removing urllib3.util.ssltransport

cleanup[2] removing urllib3.util.ssl_

cleanup[2] removing urllib3.util.timeout

cleanup[2] removing urllib3.util

cleanup[2] removing urllib3.util.proxy

cleanup[2] removing urllib3._collections

cleanup[2] removing ipaddress

cleanup[2] removing urllib3.util.ssl_match_hostname

cleanup[2] removing urllib3.connection

cleanup[2] removing _queue

cleanup[2] removing queue

cleanup[2] removing mimetypes

cleanup[2] removing urllib3.fields

cleanup[2] removing urllib3.filepost

cleanup[2] removing urllib3.packages.six.moves.urllib

cleanup[2] removing urllib3.packages.six.moves.urllib.parse

cleanup[2] removing urllib3.request

cleanup[2] removing urllib3.response

cleanup[2] removing urllib3.util.queue

cleanup[2] removing urllib3.connectionpool

cleanup[2] removing urllib3.poolmanager

cleanup[2] removing urllib3

cleanup[2] removing platform

cleanup[2] removing _json

cleanup[2] removing json.scanner

cleanup[2] removing json.decoder

cleanup[2] removing json.encoder

cleanup[2] removing json

cleanup[2] removing selenium.webdriver.remote.utils

cleanup[2] removing selenium.webdriver.remote.remote_connection

cleanup[2] removing _uuid

cleanup[2] removing uuid

cleanup[2] removing selenium.webdriver.remote.script_key

cleanup[2] removing selenium.webdriver.common.by

cleanup[2] removing selenium.webdriver.remote.shadowroot

cleanup[2] removing selenium.webdriver.common.alert

cleanup[2] removing selenium.webdriver.remote.webelement

cleanup[2] removing selenium.webdriver.remote.switch_to

cleanup[2] removing selenium.webdriver.common.proxy

cleanup[2] removing selenium.webdriver.common.options

cleanup[2] removing selenium.webdriver.common.print_page_options

cleanup[2] removing selenium.webdriver.common.timeouts

cleanup[2] removing selenium.webdriver.common.html5

cleanup[2] removing selenium.webdriver.common.html5.application_cache

cleanup[2] removing selenium.webdriver.support

cleanup[2] removing selenium.webdriver.support.relative_locator

cleanup[2] removing selenium.webdriver.remote.webdriver

cleanup[2] removing signal

cleanup[2] removing _posixsubprocess

cleanup[2] removing subprocess

cleanup[2] removing selenium.webdriver.firefox.firefox_binary

cleanup[2] removing xml

cleanup[2] removing xml.dom.domreg

cleanup[2] removing xml.dom

cleanup[2] removing xml.dom.minicompat

cleanup[2] removing xml.dom.NodeFilter

cleanup[2] removing xml.dom.xmlbuilder

cleanup[2] removing xml.dom.minidom

cleanup[2] removing selenium.webdriver.firefox.firefox_profile

cleanup[2] removing selenium.webdriver.firefox.options

cleanup[2] removing selenium.webdriver.firefox.remote_connection

cleanup[2] removing selenium.webdriver.common.service

cleanup[2] removing selenium.webdriver.firefox.service

cleanup[2] removing selenium.webdriver.firefox.webdriver

cleanup[2] removing selenium.webdriver.chrome

cleanup[2] removing selenium.webdriver.chromium

cleanup[2] removing selenium.webdriver.edge

cleanup[2] removing selenium.webdriver.chromium.options

cleanup[2] removing selenium.webdriver.edge.options

cleanup[2] removing selenium.webdriver.chrome.options

cleanup[2] removing selenium.webdriver.chromium.remote_connection

cleanup[2] removing selenium.webdriver.chromium.webdriver

cleanup[2] removing selenium.webdriver.chromium.service

cleanup[2] removing selenium.webdriver.chrome.service

cleanup[2] removing selenium.webdriver.chrome.webdriver

cleanup[2] removing selenium.webdriver.ie

cleanup[2] removing selenium.webdriver.ie.service

cleanup[2] removing selenium.webdriver.ie.options

cleanup[2] removing selenium.webdriver.ie.webdriver

cleanup[2] removing selenium.webdriver.edge.service

cleanup[2] removing selenium.webdriver.edge.webdriver

cleanup[2] removing selenium.webdriver.opera

cleanup[2] removing selenium.webdriver.opera.options

cleanup[2] removing selenium.webdriver.opera.webdriver

cleanup[2] removing selenium.webdriver.safari

cleanup[2] removing selenium.webdriver.safari.options

cleanup[2] removing selenium.webdriver.safari.service

cleanup[2] removing selenium.webdriver.safari.remote_connection

cleanup[2] removing selenium.webdriver.safari.webdriver

cleanup[2] removing selenium.webdriver.webkitgtk

cleanup[2] removing selenium.webdriver.webkitgtk.service

cleanup[2] removing selenium.webdriver.webkitgtk.options

cleanup[2] removing selenium.webdriver.webkitgtk.webdriver

cleanup[2] removing selenium.webdriver.wpewebkit

cleanup[2] removing selenium.webdriver.wpewebkit.service

cleanup[2] removing selenium.webdriver.wpewebkit.webdriver

cleanup[2] removing selenium.webdriver.wpewebkit.options

cleanup[2] removing selenium.webdriver.common.actions

cleanup[2] removing selenium.webdriver.common.actions.interaction

cleanup[2] removing selenium.webdriver.common.actions.input_device

cleanup[2] removing selenium.webdriver.common.actions.key_input

cleanup[2] removing selenium.webdriver.common.actions.key_actions

cleanup[2] removing selenium.webdriver.common.actions.mouse_button

cleanup[2] removing selenium.webdriver.common.actions.pointer_input

cleanup[2] removing selenium.webdriver.common.actions.pointer_actions

cleanup[2] removing selenium.webdriver.common.actions.wheel_input

cleanup[2] removing selenium.webdriver.common.actions.wheel_actions

cleanup[2] removing selenium.webdriver.common.actions.action_builder

cleanup[2] removing selenium.webdriver.common.action_chains

cleanup[2] removing selenium.webdriver

cleanup[2] removing selenium.webdriver.support.select

cleanup[2] removing selenium.webdriver.support.wait

cleanup[2] removing selenium.webdriver.support.ui

cleanup[2] removing _bootlocale

destroy _bootlocale

cleanup[2] removing unicodedata

cleanup[2] removing stringprep

cleanup[2] removing encodings.idna

destroy _queue

destroy _sha3

destroy _blake2

destroy _datetime

destroy _bz2

destroy selenium.webdriver

destroy selenium.webdriver.firefox

destroy selenium.webdriver.firefox.firefox_binary

destroy selenium.webdriver.firefox.firefox_profile

destroy selenium.webdriver.firefox.options

destroy selenium.webdriver.firefox.remote_connection

destroy selenium.webdriver.firefox.service

destroy selenium.webdriver.firefox.webdriver

destroy selenium.webdriver.common

destroy selenium.webdriver.common.desired_capabilities

destroy selenium.webdriver.common.keys

destroy selenium.webdriver.common.by

destroy selenium.webdriver.common.alert

destroy selenium.webdriver.common.proxy

destroy selenium.webdriver.common.options

destroy selenium.webdriver.common.print_page_options

destroy selenium.webdriver.common.timeouts

destroy selenium.webdriver.common.html5

destroy selenium.webdriver.common.html5.application_cache

destroy selenium.webdriver.common.actions

destroy selenium.webdriver.common.actions.input_device

destroy selenium.webdriver.common.actions.key_input

destroy selenium.webdriver.common.actions.key_actions

destroy selenium.webdriver.common.actions.mouse_button

destroy selenium.webdriver.common.actions.pointer_input

destroy selenium.webdriver.common.actions.pointer_actions

destroy selenium.webdriver.common.actions.wheel_input

destroy selenium.webdriver.common.actions.wheel_actions

destroy selenium.webdriver.common.actions.action_builder

destroy selenium.webdriver.common.action_chains

destroy selenium.webdriver.remote

destroy selenium.webdriver.remote.bidi_connection

destroy selenium.webdriver.remote.command

destroy selenium.webdriver.remote.errorhandler

destroy selenium.webdriver.remote.file_detector

destroy selenium.webdriver.remote.mobile

destroy selenium.webdriver.remote.remote_connection

destroy selenium.webdriver.remote.script_key

destroy selenium.webdriver.remote.shadowroot

destroy selenium.webdriver.remote.webelement

destroy selenium.webdriver.remote.switch_to

destroy selenium.webdriver.remote.webdriver

destroy selenium.webdriver.support

destroy selenium.webdriver.support.relative_locator

destroy selenium.webdriver.support.select

destroy selenium.webdriver.support.wait

destroy selenium.webdriver.support.ui

destroy selenium.webdriver.chrome

destroy selenium.webdriver.chrome.options

destroy selenium.webdriver.chrome.service

destroy selenium.webdriver.chrome.webdriver

destroy selenium.webdriver.chromium

destroy selenium.webdriver.chromium.options

destroy selenium.webdriver.chromium.remote_connection

destroy selenium.webdriver.chromium.webdriver

destroy selenium.webdriver.edge

destroy selenium.webdriver.edge.options

destroy selenium.webdriver.edge.service

destroy selenium.webdriver.edge.webdriver

destroy selenium.webdriver.ie

destroy selenium.webdriver.ie.service

destroy selenium.webdriver.ie.options

destroy selenium.webdriver.ie.webdriver

destroy selenium.webdriver.opera

destroy selenium.webdriver.opera.options

destroy selenium.webdriver.opera.webdriver

destroy selenium.webdriver.safari

destroy selenium.webdriver.safari.options

destroy selenium.webdriver.safari.service

destroy selenium.webdriver.safari.remote_connection

destroy selenium.webdriver.safari.webdriver

destroy selenium.webdriver.webkitgtk

destroy selenium.webdriver.webkitgtk.service

destroy selenium.webdriver.webkitgtk.options

destroy selenium.webdriver.webkitgtk.webdriver

destroy selenium.webdriver.wpewebkit

destroy selenium.webdriver.wpewebkit.service

destroy selenium.webdriver.wpewebkit.webdriver

destroy selenium.webdriver.wpewebkit.options

destroy _sitebuiltins

destroy _struct

destroy _compression

destroy _lzma

destroy pwd

destroy grp

destroy struct

destroy bz2

destroy lzma

destroy importlib.util

destroy importlib.resources

destroy importlib.machinery

destroy importlib

destroy zipimport

destroy _socket

destroy string

destroy certifi

destroy certifi.core

destroy urllib3

destroy platform

destroy selenium.webdriver.remote.utils

destroy importlib.abc

destroy fnmatch

destroy urllib.parse

destroy ntpath

destroy urllib3.packages

destroy urllib3.exceptions

destroy urllib3._version

destroy urllib3.contrib

destroy urllib3.util

destroy urllib3.util.wait

destroy urllib3.util.request

destroy urllib3.util.response

destroy urllib3.util.retry

destroy urllib3.util.url

destroy urllib3.util.ssltransport

destroy urllib3.util.ssl_

destroy urllib3.util.timeout

destroy urllib3.util.proxy

destroy urllib3.util.ssl_match_hostname

destroy urllib3.util.queue

destroy urllib3._collections

destroy urllib3.connection

destroy urllib3.fields

destroy urllib3.filepost

destroy urllib3.request

destroy urllib3.response

destroy urllib3.connectionpool

destroy urllib3.poolmanager

destroy operator

destroy types

destroy urllib3.packages.six.moves

destroy urllib3.packages.six.moves.urllib

destroy urllib3.packages.six.moves.urllib_parse

destroy urllib3.packages.six.moves.urllib.error

destroy urllib3.packages.six.moves.urllib.request

destroy urllib3.packages.six.moves.urllib.response

destroy urllib3.packages.six.moves.urllib.robotparser

destroy http

destroy email.quoprimime

destroy email.base64mime

destroy email.encoders

destroy email._parseaddr

destroy email._policybase

destroy email.feedparser

destroy email.parser

destroy email._encoded_words

destroy email.iterators

destroy email.message

destroy email.header

destroy random

destroy calendar

destroy locale

destroy encodings

destroy uu

destroy quopri

destroy email.utils

destroy email.charset

destroy email.errors

destroy _ssl

destroy datetime

destroy urllib3.util.connection

destroy urllib3.contrib._appengine_environ

destroy hmac

destroy hashlib

destroy socket

destroy ssl

destroy ipaddress

destroy binascii

destroy email

destroy mimetypes

destroy urllib

destroy zlib

destroy queue

destroy logging

destroy urllib3.packages.six

destroy json.decoder

destroy json.encoder

destroy json.scanner

destroy _json

destroy _uuid

destroy _hashlib

destroy pkgutil

destroy signal

destroy contextlib

destroy select

destroy selectors

destroy _signal

destroy _posixsubprocess

destroy json

destroy shutil

destroy tempfile

destroy zipfile

destroy xml.dom

destroy xml.dom.minicompat

destroy xml.dom.NodeFilter

destroy xml.dom.xmlbuilder

destroy xml.dom.minidom

destroy xml.dom.domreg

destroy copy

destroy xml

destroy errno

destroy subprocess

destroy base64

destroy selenium.webdriver.chromium.service

destroy selenium.webdriver.common.utils

destroy http.client

destroy selenium.webdriver.common.service

destroy uuid

destroy selenium.webdriver.common.actions.interaction

destroy unicodedata

cleanup[3] wiping encodings.idna

destroy stringprep

cleanup[3] wiping _random

cleanup[3] wiping _sha512

cleanup[3] wiping _bisect

cleanup[3] wiping atexit

cleanup[3] wiping _string

cleanup[3] wiping traceback

destroy linecache

cleanup[3] wiping tokenize

cleanup[3] wiping math

cleanup[3] wiping weakref

cleanup[3] wiping importlib._bootstrap_external

cleanup[3] wiping importlib._bootstrap

destroy _frozen_importlib_external

cleanup[3] wiping collections.abc

cleanup[3] wiping threading

cleanup[3] wiping warnings

cleanup[3] wiping re

destroy enum

destroy sre_compile

destroy copyreg

cleanup[3] wiping _locale

destroy _locale

cleanup[3] wiping functools

cleanup[3] wiping _functools

destroy _functools

cleanup[3] wiping collections

destroy _collections_abc

destroy heapq

destroy collections.abc

cleanup[3] wiping _collections

destroy _collections

cleanup[3] wiping itertools

destroy itertools

cleanup[3] wiping _heapq

cleanup[3] wiping _operator

destroy _operator

cleanup[3] wiping sre_parse

cleanup[3] wiping _sre

cleanup[3] wiping os

destroy posixpath

cleanup[3] wiping genericpath

cleanup[3] wiping stat

cleanup[3] wiping _stat

destroy _stat

cleanup[3] wiping io

destroy abc

cleanup[3] wiping _abc

cleanup[3] wiping encodings.latin_1

cleanup[3] wiping encodings.utf_8

cleanup[3] wiping encodings.cp437

cleanup[3] wiping encodings.aliases

cleanup[3] wiping codecs

cleanup[3] wiping _codecs

cleanup[3] wiping time

cleanup[3] wiping _weakref

cleanup[3] wiping _thread

cleanup[3] wiping posix

cleanup[3] wiping marshal

destroy marshal

cleanup[3] wiping _io

destroy io

cleanup[3] wiping _warnings

cleanup[3] wiping _imp

destroy _imp

cleanup[3] wiping _frozen_importlib

cleanup[3] wiping sys

cleanup[3] wiping builtins

destroy stat

destroy genericpath

destroy _sre

destroy sre_parse

destroy functools

destroy tokenize

destroy _heapq

destroy _frozen_importlib

clear sys.audit hooks

SyntaxError: invalid syntax

Hello My Friend. I get this error, what should I edit in vi to resolve this. If anybody knows please help. Thank You In Advance

File "pass-fur-alle.py", line 7

^
SyntaxError: invalid syntax

Selecting "Expedition" doesn't seem to work

First, nice script, thanks!

Tried to use it to book at specific "Expedition" but that fails because the available times are presented weekly for a single "Expedition" rather than by "Expidition" as it does when you search for all Expeditions. The script terminates.

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

Possible way to book for multiple persons?

add variable

numberOfPeople = 4

On "accept-screen"

        Select(web.find_element(by=By.XPATH, value='//*[@id="NumberOfPeople"]')).select_by_visible_text(str(numberOfPeople))

change radiobutton behaviour

        liveInRadios = web.find_elements(by=By.XPATH, value="//input[@type='radio'][@value='2']")
        for liveInRadio in liveInRadios:
          liveInRadio.click()

Ny "låsning"? Telefonnummer får varning om att inte var korrekt

Jag får telefonnummer är inte korrekt när jag kör automatik. Kör copy&paste manuellt ger samma resultat. När jag matar inte det manuellt så går det igenom (exakt samma nummer).

Kanske en ny version av att de försöker blockera scriptet? Händer inte alltid utan intermittent.

Bara för info & kanske en varning att de jobbar på nåt med det så stäng "issuen" när/om du vill ;)

RequestsDependencyWarning: urllib3 (1.26.9) or chardet (3.0.4) doesn't match a supported version!

Have an issue when rubning it in wsl.

Full stack trace below.

Folled the instructions in the README

warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "pass-fur-alle.py", line 15, in
web = webdriver.Chrome(options=options)
File "/home/xzay/.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/xzay/.local/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 90, in init
self.service.start()
File "/home/xzay/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/home/xzay/.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: 127

reCAPTCHA

def handleReCAPTCHA():
    try:
        web.execute_script("""
            document.querySelector('.mtcaptcha.controls').remove();
        """)
    except NoSuchElementException:
        pass

This banal solution worked for me @jonkpirateboy sry for not creating a PR but did not have time yet.

NameError: name 'driver' is not defined

Jag har problem med att klicka på den första knappen "Boka tid". Får felmeddelandet "NameError: name 'driver' is not defined". Enligt vad jag googlat mig till så kan detta bero på en bugg i Selenium, vilket man kan lösa genom att nedgradera <= 4. Alternativt kan man uppgradera sin chromedriver.

Har även testat:
WebDriverWait(web,20).until(EC.element_to_be_clickable((By.XPATH,'//*[@Class="btn btn-primary btn-large disable-on-save"]'))).click()
Men får då ett liknande fel.

Nu tror jag att jag har de senaste versionerna av både selenium och chromedriver - så jag är lite osäker på hur jag går vidare. Ingen annan som har detta problem? Jag har kört brew upgrade och har försökt komma vidare på alla möjliga sätt. Men får ändå samma fel. Någon som har tips på hur jag kommer vidare? Kanske har jag en för gammal dator? Använder macOS High Sierra 10.13.6 på iMac från 2010...

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.

the developer cannot be verified??

Received the error:

“chromedriver” cannot be opened because the developer cannot be verified.

macOS cannot verify that this app is free from malware.

How can I go around this?

"First available time"

Is there a reason why the script doesn't use the "First available time"-button, and simply clicks that over and over until a time is found? I might take a crack at it, but maybe you had a good reason for not doing it. :)

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?

Is the new version working?

Hi! Thanks for updating this. Regrettably the new version doesn't seem to work for me. I am running chrome and tampermonkey says that the script (which I have modified with new date) is active, but I don't see anything different on the timesearch page. Any help is appreciated.

Let me know what other info I could give to help.

Update: I got it working. Some weird hidden symbols from my editor tagged along in the copy paste. However I am getting same error as commenter below me now, badassbeef.

Too many redirections

The Tampermonkey script doesn't work. Gets an error message: Too many redirections.

Booking web site detects automation.

Hi,

I just noticed that as of today, the script that was working yesterday for me, stopped working. Starting it I get redirected to:
https://reserv.polisen.se/for-manga-anrop/

Seems like Polisen web-site is able to detect automation ... Opening the booking web site from the Chrome browser through same WSL system worked fine. Tried also changing all sleep statements to 5s instead of 0.5s, but no luck, the redirect happens immediately for me.

Any ideas?

Best,
Ugis

Website error "too many calls".

After running it for a couple of hours and then restarting the script, I got the website error about me calling on the website too much.
Is there a way to bypass this? Rerouting through proxy? Or is that going to block me since proxies can be a bit sus to some websites?

I have reset browser, started a new VMbox session to no avail.
Even tried on Ubuntu instead of Kali. No result. Still same error.

I know they were going to implement some kind of bot protection. But how do we bypass this? I do really need my passsport! XD

I get redirected to reserv.polisen.se

When running the script I get redirected to reserv.polisen.se.
And get the message:

För många anrop
Du har gjort för många anrop till polisen.se under en kort tid. Ditt besök har dirigerats till vår reservwebbplats.

Any solution to this?

BR
Sven

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.