- Search Immobilienscout on new ads in Charlottenburg (Berlin)
- Update found results
- on Twitter
- on personal Google Sheet with more details of the ads
- to be sent to personal emails
- First, I was just curious if I can do it by myself. Could I understand python modules? Could I read other people's codes?
- By creating your own program, you can tailor/modify the content you want to see. For example, you may have an email like this
We sort the ads according to rooms, warm price (this number does not show up in a general search). We care whether the flats/appartment is from private person or from a company. Does it have kitchen or balcony, etc?
- You can also focus on 2-room or 3-room flats.
- Are you curious how rent in Berlin changes, especially the flats that you used to live?
You need to do several things (more details in the reference):
-
Clone/fork this repository to your github.
-
Sign up for an Heroku account, create a new app. Deploy the app via Github.
-
Sign up for Twitter and Twitter Dev to have Twitter API keys (4 keys). Store these keys in the Heroku app, in
Config Vars
. These values will be read later byos.environ[...]
- An instruction for Heroku and Twitter sign up can be found here
-
To connect to your Google Sheet, you need to create an authorization json file for Google Sheet API in Google Console. Store the file in Heroku app, in
Config Vars
- Create an appropriate gsheet, named
'Charlottenburg'
. - Share this sheet with the email from gsheet API json file.
- The first time running the program, you should turn off
updatet_tweet(ads_msgs)
since there will be a lot of new ads.
- Create an appropriate gsheet, named
-
To send email, you need to enter the emails you want to send in
Config Vars
-
You can check, or run Heroku app by going to the top right corner,
More
,Run console
, typeworker
. Heroku will runbot.py
.
-
Search on Immobilienscout24:
-
Host server for bot:
-
Twitter
- Twitter API
- Tweepy, a python library to work with Twitter
-
Json
- Google credential with json in Heroku
- JSON parse: very helpful to understand the data structure in Immobilienscout
-
Send email: