RSS#
- class RSSAPIMixIn(host=None, port=None, username=None, password=None, EXTRA_HEADERS=None, REQUESTS_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='', **kwargs) None #
Add new RSS feed. Folders in path must already exist.
- Raises:
- Parameters:
url (
str
|None
) – URL of RSS feed (e.g. https://distrowatch.com/news/torrents.xml)item_path (
str
) – Name and/or path for new feed; defaults to the URL. (e.g.Folder\Subfolder\FeedName
)
- Return type:
- rss_add_folder(folder_path=None, **kwargs) None #
Add an RSS folder. Any intermediate folders in path must already exist.
- rss_items(include_feed_data=None, **kwargs) RSSitemsDictionary #
Retrieve RSS items and optionally feed data.
- 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:
- Parameters:
- Return type:
- 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).
- rss_move_item(orig_item_path=None, new_item_path=None, **kwargs) None #
Move/rename an RSS item (folder, feed, etc.).
- 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.
- rss_remove_item(item_path=None, **kwargs) None #
Remove an RSS item (folder, feed, etc.).
NOTE: Removing a folder also removes everything in it.
- 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).
- rss_rules(**kwargs) RSSRulesDictionary #
Retrieve RSS auto-download rule definitions.
- Return type:
- 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:
- Parameters:
url (
str
|None
) – URL of RSS feed (e.g. https://distrowatch.com/news/torrents.xml)item_path (
str
|None
) – Name and/or path for feed (e.g.Folder\Subfolder\FeedName
)
- Return type:
- rss_set_rule(rule_name=None, rule_def=None, **kwargs) None #
Create a new RSS auto-downloading rule.
- Parameters:
rule_def (
Optional
[Mapping
[str
,Union
[None
,int
,str
,bool
,Sequence
[Union
[None
,int
,str
,bool
,Sequence
[JsonValueT],Mapping
[str
, JsonValueT]]],Mapping
[str
,Union
[None
,int
,str
,bool
,Sequence
[JsonValueT],Mapping
[str
, JsonValueT]]]]]]) – dictionary with rule fields - https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#user-content-set-auto-downloading-rule
- Return type:
- 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
- add_feed(url=None, item_path='', **kwargs) None #
Add new RSS feed. Folders in path must already exist.
- Raises:
- Parameters:
url (
str
|None
) – URL of RSS feed (e.g. https://distrowatch.com/news/torrents.xml)item_path (
str
) – Name and/or path for new feed; defaults to the URL. (e.g.Folder\Subfolder\FeedName
)
- Return type:
- add_folder(folder_path=None, **kwargs) None #
Add an RSS folder. Any intermediate folders in path must already exist.
- 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:
- Parameters:
- Return type:
- 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).
- move_item(orig_item_path=None, new_item_path=None, **kwargs) None #
Move/rename an RSS item (folder, feed, etc.).
- 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.
- remove_item(item_path=None, **kwargs) None #
Remove an RSS item (folder, feed, etc.).
NOTE: Removing a folder also removes everything in it.
- 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).
- property rules: RSSRulesDictionary#
Retrieve RSS auto-download rule definitions.
- 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:
- Parameters:
url (
str
|None
) – URL of RSS feed (e.g. https://distrowatch.com/news/torrents.xml)item_path (
str
|None
) – Name and/or path for feed (e.g.Folder\Subfolder\FeedName
)
- Return type:
- set_rule(rule_name=None, rule_def=None, **kwargs) None #
Create a new RSS auto-downloading rule.
- Parameters:
rule_def (
Optional
[Mapping
[str
,Union
[None
,int
,str
,bool
,Sequence
[Union
[None
,int
,str
,bool
,Sequence
[JsonValueT],Mapping
[str
, JsonValueT]]],Mapping
[str
,Union
[None
,int
,str
,bool
,Sequence
[JsonValueT],Mapping
[str
, JsonValueT]]]]]]) –dictionary with rule fields - https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#user-content-set-auto-downloading-rule
- Return type: