Fix exception for when no results returned.

This commit is contained in:
KontiSR 2014-09-19 12:05:50 +02:00
parent c65385da96
commit 8b678445cc

View file

@ -105,6 +105,7 @@ class TokyoToshokanProvider(generic.TorrentProvider):
with BS4Parser(data, features=["html5lib", "permissive"]) as soup:
torrent_table = soup.find('table', attrs={'class': 'listing'})
torrent_rows = torrent_table.find_all('tr') if torrent_table else []
if torrent_rows:
if torrent_rows[0].find('td', attrs={'class': 'centertext'}):
a = 1
else: