You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-10 Current date: 2024-07-29
Image input capabilities: Enabled Personality: v2
import os | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'console': { | |
'level': 'DEBUG', | |
'class': 'logging.StreamHandler', | |
}, | |
'file': { |
from functools import wraps | |
import logging | |
import time | |
import requests | |
logger = logging.getLogger(__name__) | |
TELEGRAM_NOTIFICATION_BOT = 'YOUR_TELEGRAM_NOTIFICATION_BOT' | |
TELEGRAM_NOTIFICATION_CHANNEL_ID = 'YOUR_TELEGRAM_NOTIFICATION_CHANNEL_ID' |
""" | |
Divar to Telegram Notifier Bot | |
This script monitors a filtered Divar page and sends newly posted items to a specified Telegram channel every 60 seconds. | |
Setup Instructions: | |
1. Create a Telegram bot using BotFather. | |
2. Add the bot to your Telegram group or channel. | |
3. Promote the bot as an admin in your channel so it can post messages. | |
4. Use @username_to_id_bot to get the numeric ID of your channel (e.g., -1001234567890). |