Skip to content

Prevent errors on PirateBay plugin when scanning ads#2492

Merged
paranoidi merged 2 commits intoFlexget:developfrom
mfonville:develop
Nov 14, 2019
Merged

Prevent errors on PirateBay plugin when scanning ads#2492
paranoidi merged 2 commits intoFlexget:developfrom
mfonville:develop

Conversation

@mfonville
Copy link
Copy Markdown
Contributor

Motivation for changes:

Currently the Piratebay plugin gives errors when scanning their site, because of advertisements that are also marked as class="detLink". This change detects if the ULed user was piratebay, which indicates that it is an advertisement.

DEBUG    utils.requests Series-Trakt    GETing URL ... with args () and kwargs {'allow_redirects': True, 'timeout': 30}
DEBUG    plugin        Series-Trakt    decorator caught ValueError. handled traceback:
Traceback (most recent call last):
  File "flexget/plugin.py", line 119, in wrapped_func
    return func(*args, **kwargs)
  File "flexget/components/sites/sites/piratebay.py", line 164, in search
    entry['torrent_seeds'] = int(tds[-2].contents[0])
ERROR    discover      Series-Trakt    Error searching with piratebay: invalid literal for int() with base 10: '\n\t\t\t\t'

@mfonville
Copy link
Copy Markdown
Contributor Author

@paranoidi is this ready for you to merge?

@paranoidi
Copy link
Copy Markdown
Member

Sure, thanks for contributions!

@paranoidi paranoidi merged commit f8d5456 into Flexget:develop Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants