bonntermin
Automatically scrape Stadt Bonn's Dienstleistungszentrum appointment service for the earliest month that you can reserve. If this bookable month is the one you desire, you'll receive an email notification.
Requirements
Python dependencies:
pip install scrapy dateparser
Customization
There are two files that you have to customize in order to make full use of the scrape's result.
spiders/bonn.py
You have to modify the variables form_data
, wanted_year
, wanted_month
, notification_email
.
The appropiate values for form_data
can be found here. Just look into the source code of the website. The example {'casetype_9664': '1', 'casetype_9656': '1'}
stands for Personalausweis-Antrag and Reisepass-Antrag respectively.
If the spider finds that the earliest bookable date is equal to your wanted_month
and wanted_year
, it will send an email to notification_email
.
settings.py
Add your SMTP server settings according to Scrapy's documentation, otherwise you won't receive an email notification.
Periodic Job
Obviously, for this to make sense you should set up a periodic job. You could do that locally on your machine, but you could also use a service like Scrapinghub. This is highly recommended and it's very easy to set up.
License
Distributed under the MIT license. See the LICENSE file for more info.