Conversation
|
Hello, I don't get why the plugin is considered a "task" too, and therefore throw errors on test. It should only be "search" and "urlrewrite". |
flexget/plugins/sites/torrentz2.py
Outdated
|
|
||
| @event('plugin.register') | ||
| def register_plugin(): | ||
| plugin.register(Torrentz2, 'torrentz2', groups=['urlrewriter', 'search'], api_ver=2) |
There was a problem hiding this comment.
The 'groups' argument was deprecated, this should be replaced with 'interfaces'. (This will also clear up the problem with tests where it's being considered a task plugin.)
Change plugin name to torrentz (allow backward comptability with old config files)
|
I think maybe you forgot to add back the file after you renamed it to just torrentz, right now the PR is empty. |
|
@gazpachoking |
|
Thanks! |
Daeymien
left a comment
There was a problem hiding this comment.
3/4 domains are invalid
3/4 feeds are invalid
feed query format is incorrect
| 'any': 'feed_any', | ||
| 'low': 'feed_low', | ||
| 'good': 'feed', | ||
| 'verified': 'feed_verified' |
There was a problem hiding this comment.
only valid feed is 'feed'. 'feed_low','feed_any', 'feed_verified' do not exist
|
|
||
| log = logging.getLogger('torrentz') | ||
|
|
||
| REGEXP = re.compile(r'https?://torrentz2\.(eu|me|ch|in)/(?P<hash>[a-f0-9]{40})') |
There was a problem hiding this comment.
.me, .ch, .in are not valid domains for torrentz2
valid domains are .eu and .is
| entries = set() | ||
| for search_string in entry.get('search_strings', [entry['title']]): | ||
| query = normalize_unicode(search_string + config.get('extra_terms', '')) | ||
| for domain in ['eu', 'me', 'ch', 'in']: |
There was a problem hiding this comment.
.me, .ch, .in are not valid domains for torrentz2
valid domains are .eu and .is
| query = normalize_unicode(search_string + config.get('extra_terms', '')) | ||
| for domain in ['eu', 'me', 'ch', 'in']: | ||
| # urllib.quote will crash if the unicode string has non ascii characters, so encode in utf-8 beforehand | ||
| url = 'http://torrentz2.%s/%s?q=%s' % (domain, feed, quote(query.encode('utf-8'))) |
There was a problem hiding this comment.
query in feed url takes form of 'f=' not 'q='
e.g. https://torrentz2.eu/feed?f={{ search_term }}
|
Thanks @Daeymien. Care to open up a PR by chance? |
|
@gazpachoking Done. #2301 |
Motivation for changes:
Read-add torrentz2 plugin (based on previous torrentz, but with new urls)
Detailed changes:
Addressed issues:
Implemented feature requests:
Config usage if relevant (new plugin or updated schema):
Log and/or tests output (preferably both):
To Do: