Ignore header in TPB results
This commit is contained in:
@@ -93,11 +93,15 @@ class ThePirateBay(TorrentProvider):
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
entries = results_table.find_all('tr')
|
entries = results_table.find_all('tr')
|
||||||
for result in entries[1:]:
|
for result in entries[2:]:
|
||||||
link = result.find(href = re.compile('torrent\/\d+\/'))
|
link = result.find(href = re.compile('torrent\/\d+\/'))
|
||||||
download = result.find(href = re.compile('magnet:'))
|
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:
|
if link and download:
|
||||||
|
|
||||||
def extra_score(item):
|
def extra_score(item):
|
||||||
|
|||||||
Reference in New Issue
Block a user