A Telegram bot that searches nCore and adds torrents to qBittorrent from your phone.
- Send
/dl <title>in Telegram - Choose Movie or Series
- Tap the result you want (sorted by seeders)
- The bot adds it to qBittorrent and notifies you when it's done
- Docker and Docker Compose
- qBittorrent running with Web UI enabled
- An nCore account
- A Telegram bot token (get one from @BotFather)
git clone <repo-url>
cd ncore-botcp config.example.py config.pyOpen config.py and fill in your details:
# nCore
NCORE_USERNAME = "your_username"
NCORE_PASSHASH = "your_pass_cookie_value"
# Telegram
TELEGRAM_TOKEN = "your_token_from_botfather"
ALLOWED_USERS = [123456789] # your Telegram user ID
# qBittorrent
QBIT_URL = "http://192.168.1.x:8080"
QBIT_USERNAME = "admin"
QBIT_PASSWORD = "your_password"
QBIT_SAVE_PATH_MOVIES = "F:\\Downloads\\Movies"
QBIT_SAVE_PATH_SERIES = "F:\\Downloads\\Series"
QBIT_CATEGORY_MOVIES = "Movies"
QBIT_CATEGORY_SERIES = "Series"
# Search
CATEGORIES = "hd_hun,hd"
CATEGORIES_SERIES = "hdser_hun,hdser"
QUALITY_FILTER = [] # e.g. ["1080", "2160"] to only show those qualities, or [] for all
TOP_RESULTS = 5 # how many results to show in Telegram (after sorting by seeders)
MAX_PAGES = 5 # how many nCore search-result pages to fetchHow to find your Telegram user ID: Start the bot, send /myid, and it will reply with your ID. Add that number to ALLOWED_USERS.
How to get NCORE_PASSHASH:
nCore uses reCAPTCHA on the login page, so the bot cannot log in with a username and password directly. Instead it uses a cookie called pass that your browser stores after you log in. Follow these steps to get it:
- Log out of nCore in your browser
- Log back in, but before clicking the login button, check the "Csökkentett biztonság" (Reduced security) checkbox. This tells nCore to store your session in a long-lived cookie. If you already had this checked last time you logged in, you can skip the logout and just read the cookie value directly.
- After logging in, open the browser developer tools (F12)
- Go to Application -> Cookies -> ncore.pro
- Find the cookie named
passand copy its value - Paste that value into
NCORE_PASSHASHinconfig.py
You can log out and back in normally after this. The cookie value stays valid for a long time. If the bot ever stops working with a login error, just repeat these steps to get a fresh value.
docker-compose up -d --buildThe bot will start and automatically restart if the machine reboots.
View logs:
docker-compose logs -fStop the bot:
docker-compose downRestart after changing config.py:
docker-compose up -d --build| Command | What it does |
|---|---|
/dl <title> |
Search nCore and download |
/recent |
Show the last 5 torrents and their status |
/myid |
Show your Telegram user ID |
/start |
Show how to use the bot |
/help |
List all commands |
/cancel |
Cancel the current search |
You: /dl Breaking Bad
Bot: "Breaking Bad" — movie or series?
[ Movie ] [ Series ]
You: Series
Bot: Choose one:
[ Breaking Bad S01 1080p HUN · 42s · 28.5 GB ]
[ Breaking Bad S01 720p HUN · 18s · 12.1 GB ]
[ Cancel ]
You: Breaking Bad S01 1080p HUN · 42s · 28.5 GB
Bot: Starting download: Breaking Bad S01 1080p HUN...
... later ...
Bot: Download complete: Breaking Bad S01 1080p HUN
Add more Telegram user IDs to ALLOWED_USERS in config.py:
ALLOWED_USERS = [123456789, 987654321]Each person only gets a notification for their own downloads.
No results found
- Check if
QUALITY_FILTERinconfig.pyis too strict. Set it to[]to turn it off.
SSL or connection error
- The bot retries automatically with a fresh login. If it still fails, check your network connection and whether nCore is accessible in your browser.
"You don't have permission to use this bot"
- Your Telegram user ID is missing from
ALLOWED_USERS. Send/myidto get your ID, add it toconfig.py, then rundocker-compose up -d --build.
No notification when download finishes
- Run
docker-compose logs -fand look for lines withChecking N tracked torrent(s)to see if the bot is checking progress. - The bot checks every 60 seconds while at least one tracked download is active, and stops polling once all of them finish. It resumes automatically when you start a new download.