rightmove.co.uk is one of the UK's largest property listings websites, hosting thousands of listings of properties for sale and rent.
This python script scrapes property listings from rightmove.co.uk website. It also sends a notification through Telegram if new ads added that respects the search criteria.
Telegram Bot is used.
- Create your bot by following these instructions
- Save the generated token
- Get the list of updates for your bot by going to
https://api.telegram.org/bot<YourBOTToken>/getUpdates
- Send a message to your bot (any)
- Look for
"id"
and that would be your chatid
In case you would add the bot to a group (public or private), here are the instructions
I strongly suggest using a virtual environment, eg. miniconda wiht the following packages:
python 3.x
requestes
Beautiful Soap
conda create --name rightmove python=3.8 requests bs4
conda activate rightmove
Why python -m pip ...
? Here is a meaningful explanation Why you should use python -m pip
?
Activate the environment (if you have created it), then:
python rightmove.py --url ... --addtoken ... --addchatid ...
--url
is the URL of your search--addtoken
is the token of the bot--addchatid
is the id of the chat to send the notification
It makes a new request for every random delta between 30 min
to 1 hour
.
This project is meant only for educational purposes. Even though this script makes a new request between 30min and 1 hour, scraping a website is a grey area.