Private GIT

Skip to content
Snippets Groups Projects
Commit 6ebad6bf authored by miigotu's avatar miigotu
Browse files

Merge pull request #372 from SickRage/ttn-tweak

Fix AttributeError in ttn when no results are found
parents 91ebd57c cf9c8625
Branches
Tags
No related merge requests found
......@@ -108,6 +108,10 @@ class TransmitTheNetProvider(generic.TorrentProvider):
try:
with BS4Parser(data, features=["html5lib", "permissive"]) as html:
torrent_table = html.find('table', {'id':'torrent_table'})
if not torrent_table:
logger.log(u"Data returned from %s does not contain any torrents" % self.name, logger.DEBUG)
continue
torrent_rows = torrent_table.findAll('tr', {'class':'torrent'})
# Continue only if one Release is found
if not torrent_rows:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment