Merge pull request #754 from JackDandy/feature/ChangeIPT

Change IPTorrents.
This commit is contained in:
JackDandy 2016-08-18 18:11:17 +01:00 committed by GitHub
commit 698ca1751e

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):