ATTENTION: This code is a prototype with minimal functionality.
A Telegram bot for managing and interacting with rutracker.org dump from 2014 year. This bot is built using Python. Note, that using information from rutracker.org can be illegal in some countries and don't use it for outlaw activity. This is educatable project, which can be used as prototype of something better.
For this project was user rutracker dump of torrents:
PS: This is my very old pet project, which can be better. But it is not my primary idea and current functionality in not full. If you have any experience in aiogram and telegram bots - you are welcome for made pull requests.
- Search: Search torrent information by query
- Python 3.8+
- PostgreSQL
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/bazhil/torrent_bot.git cd torrent_bot -
Create .env
mv .env.example .env
-
Fill .env:
TELEGRAM_TOKEN= POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_HOST= POSTGRES_PORT= POSTGRES_DB= TORRENT_FOLDER_PATH=
-
Set up a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Configure the database:
- Download rutracker dump, set path of folder in .env
TORRENT_FOLDER_PATH=<path> - Run the database setup script:
python -m bot/async_filling_postgres.py
- Download rutracker dump, set path of folder in .env
To run the bot, execute one of the following commands based on the library you want to use:
- For
python-telegram-bot:cd bot python -m main
ATTENTION: current docker setup is not tested correctly.
To deploy the bot using Docker:
-
Build the Docker image:
docker-compose build
-
Start the container:
docker-compose up
Logs are stored in the torrent_importer.log for import-related logs.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.