This project monitors specific subreddits for video posts, downloads them, merges audio and video, and sends them to a Telegram channel.
- Monitors multiple subreddits for video posts.
- Downloads and merges video and audio using
yt-dlp
andffmpeg
. - Prevents duplicate downloads via an SQLite database.
- Automatically sends videos to a Telegram channel using
aiogram
.
git clone https://github.com/hiisync/redtg.git
cd redtg
pip install -r requirements.txt
Make sure you have yt-dlp
and ffmpeg
installed.
sudo apt update && sudo apt install ffmpeg
sudo pacman -S ffmpeg
choco install ffmpeg
Create a .env
file in the root directory (or copy .env.example
):
CLIENT_ID=your_reddit_client_id
CLIENT_SECRET=your_reddit_client_secret
USERNAME=your_reddit_username
PASSWORD=your_reddit_password
USER_AGENT=your_custom_user_agent
TELEGRAM_API_TOKEN=your_telegram_bot_token
TELEGRAM_CHANNEL_ID=your_telegram_channel_id
python src/main.py
The bot will start monitoring configured subreddits and send new videos to your Telegram channel.
redtg/
│── src/
│ │── bot.py # Telegram bot logic
│ │── config.py # Configuration (ENV variables)
│ │── database.py # Database operations
│ │── downloader.py # Video downloading and processing
│ │── main.py # Entry point
│ │── monitor.py # Subreddit monitoring
│── requirements.txt # Dependencies
│── .env # Environment variables file (ignored by Git)
Feel free to open issues or submit pull requests if you want to improve the project.
This project is licensed under the MIT License.