mendevi.download.torrent_finder¶
Search for available torrent files.
Functions
|
Retrieve a torrent from its full name. |
Search for the names of locally accessible torrents (if the mendevi repository is cloned). |
|
Search on GitLab online for the names of available torrents. |
Details
- mendevi.download.torrent_finder.get_torrent(name: str) Path[source]
Retrieve a torrent from its full name.
Parameters¶
- namestr
The full torrent name, for example “multithread.db.xz.torrent”.
Returns¶
- pathpathlib.Path
The full path of the torrent.
Raises¶
- KeyError
If the requested torrent is not included in the list of possible torrents.
- mendevi.download.torrent_finder.probe_local_torrent() set[Path][source]
Search for the names of locally accessible torrents (if the mendevi repository is cloned).
Returns¶
- torrentsset[pathlib.Path]
Provide all the local torrent files.
Examples¶
>>> from pprint import pprint >>> from mendevi.download.torrent_finder import probe_local_torrent >>> pprint(sorted(t.name for t in probe_local_torrent())) ['colorspace.db.xz.torrent', 'ctc.db.xz.torrent', 'duration.db.xz.torrent', 'multithread.db.xz.torrent', 'ramdisk.db.xz.torrent', 'svtav1_vs_rav1e_vs_aom.db.xz.torrent', 'x264_vs_openh264.db.xz.torrent'] >>>
- mendevi.download.torrent_finder.probe_online_torrent() dict[str, str][source]
Search on GitLab online for the names of available torrents.
Returns¶
- torrentsdict
For each torrent name, provide the URL for downloading it.
Examples¶
>>> from pprint import pprint >>> from mendevi.download.torrent_finder import probe_online_torrent >>> pprint(sorted(probe_online_torrent())) ['colorspace.db.xz.torrent', 'ctc.db.xz.torrent', 'duration.db.xz.torrent', 'multithread.db.xz.torrent', 'ramdisk.db.xz.torrent', 'svtav1_vs_rav1e_vs_aom.db.xz.torrent', 'x264_vs_openh264.db.xz.torrent'] >>>