Skip to content

hiisync/redtg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Video Telegram Bot

This project monitors specific subreddits for video posts, downloads them, merges audio and video, and sends them to a Telegram channel.

Features

  • Monitors multiple subreddits for video posts.
  • Downloads and merges video and audio using yt-dlp and ffmpeg.
  • Prevents duplicate downloads via an SQLite database.
  • Automatically sends videos to a Telegram channel using aiogram.

Installation

1. Clone the repository

git clone https://github.com/hiisync/redtg.git
cd redtg

2. Install dependencies

pip install -r requirements.txt

3. Install required system dependencies

Make sure you have yt-dlp and ffmpeg installed.

Debian/Ubuntu

sudo apt update && sudo apt install ffmpeg

Arch Linux

sudo pacman -S ffmpeg

Windows (via Chocolatey)

choco install ffmpeg

4. Set up environment variables

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

Usage

Start the bot

python src/main.py

The bot will start monitoring configured subreddits and send new videos to your Telegram channel.

Project Structure

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)

Contributing

Feel free to open issues or submit pull requests if you want to improve the project.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages