Change IPTorrents.

This commit is contained in:
JackDandy 2016-08-18 18:03:55 +01:00
parent 900e8d5874
commit 117dc8b400

View file

@ -78,7 +78,8 @@ class IPTorrentsProvider(generic.TorrentProvider):
raise generic.HaltParseException
with BS4Parser(html, features=['html5lib', 'permissive']) as soup:
torrent_table = soup.find('table', attrs={'class': 'torrents'})
torrent_table = soup.find('table', attrs={'id': 'torrents'}) or \
soup.find('table', attrs={'class': 'torrents'})
torrent_rows = [] if not torrent_table else torrent_table.find_all('tr')
if 2 > len(torrent_rows):