Web Scraper for the register of public sales of properties by private bailiffs in Bulgaria.
Website: https://sales.bcpea.org/properties
The python script scrapes the website, extracting all information about the properties for sale given a specific criteria. It then compares the existing properties in the Firebase Realtime Database and inserts the new ones. Then via SendGrid it sends the information about the new properties for sale to a personal email of your choice. The script is run automatically via GitHub Actions and it runs daily.
- Python - script
- Firebase Realtime Database - for storing the scraped properties
- SendGrid - for sending emails; used this service specifically so as not to have the emails marked as "Spam" by some email services
- Github Actions - automates running the script daily
- Install dependencies
pip install requests beautifulsoup4 firebase-admin python-dotenv sendgrid
- Install dependencies for
.yml
and Github Actions
pip3 freeze > requirements.txt
-
Create an
.env
file from.env.template
-
Create a database in Firebase Realtime Database to store the properties and update the
.env
file with your correspondingFIREBASE_DATABASE_URL
andFIREBASE_CREDENTIALS
. -
Register in SendGrid to get a personal API key for it and update the
SENDGRID_API_KEY
in the.env
file. -
Update the
RECEIVER_EMAIL
in.env
to the email you want the properties to be sent to. TheSMTP_EMAIL
can be any other email you've chosen.
python main.py