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 mendevi.download.torrent_finder import probe_local_torrent >>> sorted(t.name for t in probe_local_torrent()) ['multithread.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 mendevi.download.torrent_finder import probe_online_torrent >>> sorted(probe_online_torrent()) ['multithread.db.xz.torrent'] >>>