Telegram bot to notify about new listings for a given search on Zap Imóveis.
It will perform a search every x time or by request.
Made with Python and Abstra.
⚠️ This is a personal project, I'm not affiliated with Zap Imóveis in any way.
⚠️ Use at your own risk, querying Zap Imóveis APIs directly may be against their terms of use.
still working on a better way to do this, but it's only done once
- Make your search on Zap Imóveis
- Open developer tab and search for
glueon the network tab - Scroll down until you find a request with
glueon the name
- Copy the request and replace the fields on
zap.py
- Create a new bot with BotFather
- Copy the token and save it for the next step
-
Create a
.envfile on the root:TG_OWNER_CHAT_ID= TG_BOT_TOKEN= TG_WEBHOOK_TOKEN= ADMIN_EMAIL= -
TG_BOT_TOKENis the token you got from BotFather -
TG_OWNER_CHAT_IDis the chat id of the user that will receive the notifications, you may use check the logs and fill it after the first run -
TG_WEBHOOK_TOKENis a random string used to secure the webhook -
ADMIN_EMAILis the email of the admin of the bot
- This is a project made with Abstra
- Install the requirements with
pip install -r requirements.txt - Run the server with
abstra serve - Deploy it using the UI
-
Set the same environment variables on the Cloud Console UI
-
Find the public url of the admin form, login with the admin email and set the webhook
-
Create two tables with the following schemas:
listings_urlsto store the urls of the listings already senturl(varchar, unique, not nullable)zap_id(varchar, unique, not nullable)
- locks to avoid multiple instances of the bot
chat_id(varchar, unique, not nullable)
-
Send a message to the bot to test it
- You may change the interval of the search by editing the "Job" on the UI
- Search for
send_messageto customize the messages sent to the user

