3.1.0 • Published 10 months ago

tg-torrent-bot v3.1.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
10 months ago

Telegram Torrent Bot

GitHub NpmJs Ansible Galaxy DockerHub

A telegram bot implementation for torrents search and download.

Searches for torrents on supported trackers, gets magnet-links, provides/downloads .torrent files.

Supported torrent-trackers:

  • rutracker.org

DISCLAIMER: Please be aware that some materials you can get access to by means of this software might be subjects to copyright laws. Please use this software only for lawful purposes. The author of the software isn't responsible for any violations.

Installation

npm install -g tg-torrent-bot

Configuration

Configuration is done through environment variables.

VariableDescription
TELEGRAM_TOKENTelegram bot token (from @BotFather bot)
WEBHOOK_URLOptional if polling interaction is okay for you. Example: https://.herokuapp.com:443
WEBHOOK_PORTOptional if polling interaction is okay for you. Port on which the bot will be listening for requests from Telegram.
RUTRACKER_USERNAMEUsername for rutracker.org
RUTRACKER_PASSWORDPassword for rutracker.org
TORRENTS_DIROptional. Directory where to put downloaded .torrent files. If not set, the torrent file will be sent to chat in response.
ALLOWED_USERSOptional. Comma separated list of telegram user ids, who are allowed to use the bot. If not set, everyone is allowed to use the bot.
RUTRACKER_HOSTUrl of rutracker.org (for ability to use a mirror)
PROXY_TELEGRAMtrue/false. Should connection to Telegram servers be proxied.
PROXY_RUTRACKERtrue/false. Should interaction with rutracker.org be proxied.
PROXY_HOSTOptional if nothing should be proxied. Proxy host.
PROXY_PORTOptional if nothing should be proxied. Proxy port.
PROXY_PROTOCOLPossible values: http, https, socks5. Default value: http
PROXY_USERNAMEOptional if nothing should be proxied, or no proxy auth is required. Proxy username.
PROXY_PASSWORDOptional if nothing should be proxied, or no proxy auth is required. Proxy password.
DB_FILERequired if TORRENTS_DIR is set. JSON-database to track which user waits for which torrent to download.
COMPLETES_WATCHDIRRequired if TORRENTS_DIR is set. Directory to receive "download complete" event-files.

How to run

Option 1: Set up environment variables and run

export TELEGRAM_TOKEN="<telegram token>"; \
export RUTRACKER_USERNAME="<rutracker username>"; \
export RUTRACKER_PASSWORD="<rutracker password>"; \
export TORRENTS_DIR="/home/username/Torrents"; \
export RUTRACKER_HOST="https://rutracker.org"; \
export PROXY_TELEGRAM="false"; \
export PROXY_RUTRACKER="false"; \
export DB_FILE="/home/username/bot/db.json"; \
export COMPLETES_WATCHDIR="/home/username/bot/completes-watchdir"; \
  tg-torrent-bot-node

Option 2: Set up integration with Transmission using Ansible

Ansible Role: https://galaxy.ansible.com/fertkir/tg_torrent_bot_transmission

Github: https://github.com/fertkir/tg-torrent-bot-transmission

3.0.4

11 months ago

3.1.0

10 months ago

3.0.6

11 months ago

3.0.5

11 months ago

3.0.3

12 months ago

3.0.2

12 months ago

3.0.1

12 months ago

3.0.0

12 months ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago