Browse Source

Ignore header in TPB results

pull/1069/merge
Ruud 13 years ago
parent
commit
723f720280
  1. 8
      couchpotato/core/providers/torrent/thepiratebay/main.py

8
couchpotato/core/providers/torrent/thepiratebay/main.py

@ -93,11 +93,15 @@ class ThePirateBay(TorrentProvider):
return results
entries = results_table.find_all('tr')
for result in entries[1:]:
for result in entries[2:]:
link = result.find(href = re.compile('torrent\/\d+\/'))
download = result.find(href = re.compile('magnet:'))
size = re.search('Size (?P<size>.+),', unicode(result.select('font.detDesc')[0])).group('size')
try:
size = re.search('Size (?P<size>.+),', unicode(result.select('font.detDesc')[0])).group('size')
except:
continue
if link and download:
def extra_score(item):

Loading…
Cancel
Save