RSS (Really Simple Syndication) is a type of web feed that allows you to subscribe to a website's content, such as news articles, blog posts, or torrent files. By subscribing to an RSS feed, you can receive updates on new content without having to visit the website directly.
Below is a minimal Python script that:
Requirements:
Save as add_rss_qbit.py and edit the CONFIG section.
#!/usr/bin/env python3
"""
add_rss_qbit.py
Adds an RSS feed and a basic RSS rule to qBittorrent via its Web API.
"""
import requests
# CONFIG — edit these
QB_HOST = "http://127.0.0.1:8080" # qBittorrent Web UI URL
USERNAME = "admin" # web UI username
PASSWORD = "adminadmin" # web UI password
RSS_FEED_URL = "https://example.com/feed.rss"
RULE_NAME = "auto-download-rule"
RULE_FILTER = ".*" # regex to match item title (default matches all)
SAVE_PATH = "/downloads/torrents" # qBittorrent save path for matched downloads
ENABLED = True
# End CONFIG
session = requests.Session()
def login():
url = f"QB_HOST/api/v2/auth/login"
r = session.post(url, data="username": USERNAME, "password": PASSWORD)
r.raise_for_status()
if r.text != "Ok.":
raise RuntimeError("Login failed: " + r.text)
def add_feed(feed_url):
url = f"QB_HOST/api/v2/rss/addFeed"
r = session.post(url, data="url": feed_url)
r.raise_for_status()
return r.text
def get_feeds():
url = f"QB_HOST/api/v2/rss/items" # returns feed items; to list feeds use rss/feedList
r = session.get(f"QB_HOST/api/v2/rss/feedList")
r.raise_for_status()
return r.json()
def add_rule(rule_name, rule_filter, save_path, enabled=True):
url = f"QB_HOST/api/v2/rss/createRule"
data =
"ruleName": rule_name,
"ruleApplyTo": "0", # 0 = all feeds, 1 = specific feed
"ruleFeedId": "", # empty when apply to all feeds
"ruleMustContain": rule_filter,
"ruleMustNotContain": "",
"ruleUseRegex": "true", # "true"/"false"
"ruleSmartEpisodeFilter": "false",
"ruleSavePath": save_path,
"ruleAutoDownload": "true",
"ruleEpisodeFilter": "",
"ruleEnabled": "true" if enabled else "false"
r = session.post(url, data=data)
r.raise_for_status()
return r.text
def main():
try:
login()
add_feed(RSS_FEED_URL)
add_rule(RULE_NAME, RULE_FILTER, SAVE_PATH, ENABLED)
feeds = get_feeds()
print("Feeds:", feeds)
print("RSS feed and rule added successfully.")
except Exception as e:
print("Error:", e)
if __name__ == "__main__":
main()
Notes and tips:
If you want a ready-to-run example for a specific feed and rule (e.g., only episodes named "Show.S02E.*"), tell me the feed URL and desired pattern and I’ll produce the configured script.
This guide provides a comprehensive overview of adding and managing RSS feeds in qBittorrent to automate torrent downloading. How to Add RSS Feed to qBittorrent
Open qBittorrent and ensure the RSS Reader panel is visible. If not, go to View > RSS Reader or press Alt+R. Click on the RSS tab at the bottom. Click New Subscription.
Paste the RSS feed URL from your tracker or torrent site into the box. add rss feed to qbittorrent
Click OK. The feed will now appear in the list, and qBittorrent will begin downloading the feed items. Setting Up Automatic Downloads (RSS Downloader)
To automatically download torrents based on specific criteria (e.g., show name, quality): Click RSS Downloader in the RSS panel. Click Add to create a new rule. Name the rule (e.g., "Favorite Show").
Configure Criteria: Use keywords (e.g., Show.Name.S01E05.720p), select the feed to monitor, and define the saving path. Check Use regular expressions for advanced filtering. Click Save. Pro-Tips for RSS Management
Refresh Interval: Set the feed update interval in Tools > Options > RSS. RSS (Really Simple Syndication) is a type of
Manage Rules: Use the RSS Downloader to set priority, rename files, or pause added torrents.
Report Title: Automating the Intake: A Technical & Practical Guide to RSS Feeds in qBittorrent
Subject: Adding RSS Feeds to qBittorrent Date: [Current Date] Author: [Your Name/AI Analyst]
For serious automation, skip qBittorrent’s RSS and use a dedicated tool: Requirements:
Example FlexGet task:
tasks:
tv-shows:
rss: https://mysite.com/rss.xml
regexp:
accept:
- 'Show\.Name\.S\d2E\d2.*1080p'
reject:
- 'HEVC|REPACK|Proper'
qbittorrent:
host: localhost:8080
label: tv-automation