Ignore header in TPB results

This commit is contained in:
Ruud
2012-11-20 21:15:22 +01:00
parent daaa2154e5
commit 723f720280

View File

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