This is the code-based behind the Twitter account @ukpassportcheck.
Nothing is hidden. I code in the open. You can see all the code here and select Actions
tab
to see the GitHub Actions in progress.
The code is split into two parts - both use the Python package tweepy
to post to Twitter:
A simple requests
script to check whether the following UK Passport services are available:
Uses the Python package selenium
to get the appointments table when the service is online. Then
keeps checking and posts again if more appointments are added.
git clone https://github.com/mshodge/youshallnotpassport.git
pip install -r requirements.txt
python main.py
python find_appointments_fast_track.py
python find_appointments_premium.py
To post to Twitter you will need elevated v1 access on the Twitter Developer site. Then create a
file called twitter_credentials.py
in /config/
with the following:
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
Add proxy settings to a proxies.py
file in /config/
if you require them.
Change the is_proxy
to be True
in main.py
.