Telegram notifier for snatching the best deals on Carousell.
Yes.
Carousell uses Fluxible for server-side rendering (SSR). This is very nice because we can parse the React props in the <script>
tag as JSON to a Python dictionary.
The nested objects that this project need have the keys of "productsMap"
and "PRODUCTS_BROWSE"
. They happen to be valid JSON (no functions as values) so we can treat it as such and use the json.loads()
function.
-
Download this repository
-
Run this in the terminal:
python3 -m venv /path/to/new/virtual/env
. env/bin/activate
pip install -r requirements.txt
python setup.py
- Talk to your bot. Listen to a keyword with the command:
/listen <keyword>
{
"bot_token": "INSERT_BOT_TOKEN",
"chat_id": 12345215
}
Try changing the handler code to print(message.chat.id)
.
Not now.
Send me an email at dexter@dexterleng.com