diff --git a/sickbeard/providers/tvchaosuk.py b/sickbeard/providers/tvchaosuk.py index 3b265b3dc2e6a6f129516fb3127855d88c7d8ac6..7542bb2c611f02b0fb53216185e435a3e46fee7b 100644 --- a/sickbeard/providers/tvchaosuk.py +++ b/sickbeard/providers/tvchaosuk.py @@ -142,8 +142,14 @@ class TVChaosUKProvider(TorrentProvider): continue with BS4Parser(data) as html: - torrent_table = html.find(id='listtorrents').find_all('tr') - for torrent in torrent_table: + torrent_table = html.find(id='listtorrents') + if not torrent_table: + logger.log(u"Data returned from provider does not contain any torrents", logger.DEBUG) + continue + + torrent_rows = torrent_table.find_all('tr') + + for torrent in torrent_rows: try: freeleech = torrent.find('img', alt=re.compile('Free Torrent')) if self.freeleech and not freeleech: