Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgw/sopel-torrentinfo
Fetch details for selected download sites when links are posted. Pluggable via setuptools entry points.
https://github.com/dgw/sopel-torrentinfo
hacktoberfest
Last synced: about 1 month ago
JSON representation
Fetch details for selected download sites when links are posted. Pluggable via setuptools entry points.
- Host: GitHub
- URL: https://github.com/dgw/sopel-torrentinfo
- Owner: dgw
- License: other
- Created: 2017-01-08T14:49:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-18T19:30:46.000Z (about 3 years ago)
- Last Synced: 2024-05-01T18:52:46.214Z (7 months ago)
- Topics: hacktoberfest
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# sopel-torrentinfo
Sopel plugin to fetch info for torrent links.
## Site support
Sites supported at present:
* Nyaa
* TokyoToshoBoth are implemented with HTML scraping (see requirements below), as none of
the sites in this category ever seem to have APIs available.### Add-ons
Other packages may add support for other sites' links by defining one or more
`setuptools` entry points under `sopel_torrentinfo.providers`, using this
plugin's `providers.TorrentInfoProvider` class as a base. The code itself is
the best documentation, for now; comments and built-in examples describe how
the interface works.## Requirements
The `torrentinfo` plugin relies on Sopel 7.1+ and the following PyPI packages:
* `lxml` (for its `etree` module)
* `cssselect` (extends `lxml` with CSS-selector-based traversal)
* `requests` (Sopel itself requires this)Requiring `lxml` and `cssselect` for this plugin's built-in site handlers
simply means that any add-on handlers are guaranteed to have those available.Only tested on Python 3, due to Python 2 reaching EOL on January 1, 2020.
## Usage
There are no commands. Just enable the plugin and it will fetch info about
supported torrents automatically when links appear in chat.