Browse Source

Update iptorrents.py

pull/7292/head
swordfish6975 6 years ago
committed by GitHub
parent
commit
8fc37fd9bb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      couchpotato/core/media/_base/providers/torrent/iptorrents.py

4
couchpotato/core/media/_base/providers/torrent/iptorrents.py

@ -52,7 +52,7 @@ class Base(TorrentProvider):
data = self.getHTMLData(base_url % (freeleech, current_page), headers = self.getRequestHeaders()) data = self.getHTMLData(base_url % (freeleech, current_page), headers = self.getRequestHeaders())
if data: if data:
html = BeautifulSoup(data) html = BeautifulSoup(data, parser="html.parser")
try: try:
page_nav = html.find('span', attrs = {'class': 'page_nav'}) page_nav = html.find('span', attrs = {'class': 'page_nav'})
@ -62,7 +62,7 @@ class Base(TorrentProvider):
final_page_link = next_link.previous_sibling.previous_sibling final_page_link = next_link.previous_sibling.previous_sibling
pages = int(final_page_link.string) pages = int(final_page_link.string)
result_table = html.find_all('table', id="torrents") result_table = html.find('table', id="torrents")
log.debug('result_table: %s', result_table) log.debug('result_table: %s', result_table)
result_table = result_table[0] result_table = result_table[0]
if not result_table or 'nothing found!' in data.lower(): if not result_table or 'nothing found!' in data.lower():

Loading…
Cancel
Save