RSS

class RSSAPIMixIn(host=None, port=None, username=None, password=None, api_key=None, EXTRA_HEADERS=None, REQUESTS_ARGS=None, HTTPADAPTER_ARGS=None, VERIFY_WEBUI_CERTIFICATE=True, FORCE_SCHEME_FROM_HOST=False, RAISE_NOTIMPLEMENTEDERROR_FOR_UNIMPLEMENTED_API_ENDPOINTS=False, RAISE_ERROR_FOR_UNSUPPORTED_QBITTORRENT_VERSIONS=False, VERBOSE_RESPONSE_LOGGING=False, SIMPLE_RESPONSES=False, DISABLE_LOGGING_DEBUG_OUTPUT=False) None

Bases: AppAPIMixIn

Implementation of all RSS API methods.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host="localhost:8080", username="admin", password="adminadmin")
>>> rss_rules = client.rss_rules()
>>> client.rss_set_rule(rule_name="...", rule_def={...})
rss_add_feed(url=None, item_path='', refresh_interval=None, **kwargs) None

Add new RSS feed. Folders in path must already exist.

Raises:

Conflict409Error

Parameters:
Return type:

None

rss_add_folder(folder_path=None, **kwargs) None

Add an RSS folder. Any intermediate folders in path must already exist.

Raises:

Conflict409Error

Parameters:

folder_path (str | None) – path to new folder (e.g. Linux\ISOs)

Return type:

None

rss_items(include_feed_data=None, **kwargs) RSSitemsDictionary

Retrieve RSS items and optionally feed data.

Parameters:

include_feed_data (bool | None) – True or false to include feed data

Return type:

RSSitemsDictionary

rss_mark_as_read(item_path=None, article_id=None, **kwargs) None

Mark RSS article as read. If article ID is not provider, the entire feed is marked as read.

This method was introduced with qBittorrent v4.2.5 (Web API v2.5.1).

Raises:

NotFound404Error

Parameters:
  • item_path (str | None) – path to item to be refreshed (e.g. Folder\Subfolder\ItemName)

  • article_id (str | int | None) – article ID from rss_items()

Return type:

None

rss_matching_articles(rule_name=None, **kwargs) RSSitemsDictionary

Fetch all articles matching a rule.

This method was introduced with qBittorrent v4.2.5 (Web API v2.5.1).

Parameters:

rule_name (str | None) – Name of rule to return matching articles

Return type:

RSSitemsDictionary

rss_move_item(orig_item_path=None, new_item_path=None, **kwargs) None

Move/rename an RSS item (folder, feed, etc.).

Raises:

Conflict409Error

Parameters:
  • orig_item_path (str | None) – path to item to be removed (e.g. Folder\Subfolder\ItemName)

  • new_item_path (str | None) – path to item to be removed (e.g. Folder\Subfolder\ItemName)

Return type:

None

rss_refresh_item(item_path=None, **kwargs) None

Trigger a refresh for an RSS item.

Note: qBittorrent v4.1.5 through v4.1.8 all use Web API v2.2 but this endpoint was introduced with v4.1.8; so, behavior may be undefined for these versions.

Parameters:

item_path (str | None) – path to item to be refreshed (e.g. Folder\Subfolder\ItemName)

Return type:

None

rss_remove_item(item_path=None, **kwargs) None

Remove an RSS item (folder, feed, etc.).

NOTE: Removing a folder also removes everything in it.

Raises:

Conflict409Error

Parameters:

item_path (str | None) – path to item to be removed (e.g. Folder\Subfolder\ItemName)

Return type:

None

rss_remove_rule(rule_name=None, **kwargs) None

Delete a RSS auto-downloading rule.

Parameters:

rule_name (str | None) – Name of rule to delete

Return type:

None

rss_rename_rule(orig_rule_name=None, new_rule_name=None, **kwargs) None

Rename an RSS auto-download rule.

This method did not work properly until qBittorrent v4.3.0 (Web API v2.6).

Parameters:
  • orig_rule_name (str | None) – current name of rule

  • new_rule_name (str | None) – new name for rule

Return type:

None

rss_rules(**kwargs) RSSRulesDictionary

Retrieve RSS auto-download rule definitions.

Return type:

RSSRulesDictionary

rss_setFeedRefreshInterval(item_path=None, refresh_interval=None) None

Update the refresh interval for the RSS feed.

The method was introduced with qBittorrent v5.2.0 (Web API v2.11.5).

Parameters:
  • item_path (str | None) – Name and/or path for feed

  • refresh_interval (int | None) – refresh interval in minutes

Return type:

None

rss_set_feed_refresh_interval(item_path=None, refresh_interval=None) None

Update the refresh interval for the RSS feed.

The method was introduced with qBittorrent v5.2.0 (Web API v2.11.5).

Parameters:
  • item_path (str | None) – Name and/or path for feed

  • refresh_interval (int | None) – refresh interval in minutes

Return type:

None

rss_set_feed_url(url=None, item_path=None, **kwargs) None

Update the URL for an existing RSS feed.

This method was introduced with qBittorrent v4.6.0 (Web API v2.9.1).

Raises:

Conflict409Error

Parameters:
Return type:

None

rss_set_rule(rule_name=None, rule_def=None, **kwargs) None

Create a new RSS auto-downloading rule.

Parameters:
Return type:

None

class RSS(client)

Allows interaction with RSS API endpoints.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host="localhost:8080", username="admin", password="adminadmin")
>>> # this is all the same attributes that are available as named in the
>>> #  endpoints or the more pythonic names in Client (with or without 'log_' prepended)
>>> rss_rules = client.rss.rules
>>> client.rss.addFolder(folder_path="TPB")
>>> client.rss.addFeed(url="...", item_path="TPB\Top100")
>>> client.rss.remove_item(item_path="TPB") # deletes TPB and Top100
>>> client.rss.set_rule(rule_name="...", rule_def={...})
>>> items = client.rss.items.with_data
>>> items_no_data = client.rss.items.without_data
class Items(*args, client, **kwargs)
__call__(include_feed_data=None, **kwargs) RSSitemsDictionary

Implements rss_items().

Return type:

RSSitemsDictionary

property with_data: RSSitemsDictionary

Implements rss_items() with include_feed_data=True.

property without_data: RSSitemsDictionary

Implements rss_items() with include_feed_data=False.

add_feed(url=None, item_path='', refresh_interval=None, **kwargs) None

Implements rss_add_feed().

Return type:

None

add_folder(folder_path=None, **kwargs) None

Implements rss_add_folder().

Return type:

None

property items: Items

Implements rss_items().

mark_as_read(item_path=None, article_id=None, **kwargs) None

Implements rss_mark_as_read().

Return type:

None

matching_articles(rule_name=None, **kwargs) RSSitemsDictionary

Implements rss_matching_articles().

Return type:

RSSitemsDictionary

move_item(orig_item_path=None, new_item_path=None, **kwargs) None

Implements rss_move_item().

Return type:

None

refresh_item(item_path=None) None

Implements rss_refresh_item().

Return type:

None

remove_item(item_path=None, **kwargs) None

Implements rss_remove_item().

Return type:

None

remove_rule(rule_name=None, **kwargs) None

Implements rss_remove_rule().

Return type:

None

rename_rule(orig_rule_name=None, new_rule_name=None, **kwargs) None

Implements rss_rename_rule().

Return type:

None

property rules: RSSRulesDictionary

Implements rss_rules().

setFeedRefreshInterval(item_path=None, refresh_interval=None) None

Implements rss_set_feed_refresh_interval().

Return type:

None

set_feed_refresh_interval(item_path=None, refresh_interval=None) None

Implements rss_set_feed_refresh_interval().

Return type:

None

set_feed_url(url=None, item_path=None, **kwargs) None

Implements rss_set_feed_url().

Return type:

None

set_rule(rule_name=None, rule_def=None, **kwargs) None

Implements rss_set_rule().

Return type:

None

class RSSitemsDictionary(data=None, **kwargs)

Bases: Dictionary[None | int | str | bool | Sequence[JsonValueT] | Mapping[str, JsonValueT]]

Response for rss_items()

class RSSRulesDictionary(data=None, **kwargs)

Bases: Dictionary[None | int | str | bool | Sequence[JsonValueT] | Mapping[str, JsonValueT]]

Response for rss_rules()