mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 23:05:11 -05:00
Merge pull request #1382 from BillNasty/Provider_AR_Fix
Fix for 654 Backlog: failed parsing AlphaRatio Traceback
This commit is contained in:
commit
652c9f33f9
@ -183,17 +183,15 @@ class AlphaRatioProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
for result in torrent_rows[1:]:
|
for result in torrent_rows[1:]:
|
||||||
cells = result.find_all('td')
|
cells = result.find_all('td')
|
||||||
|
link = result.find('a', attrs = {'dir': 'ltr'})
|
||||||
link = cells[1].find('a', attrs={'title': 'Download'})
|
url = result.find('a', attrs = {'title': 'Download'})
|
||||||
full_id = link['href'].replace('torrents.php?action=download&id=', '')
|
|
||||||
torrent_id = full_id.split("&")[0]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
title = cells[1].find('a', attrs={'title': 'View Auto Torrent'}).contents[0]
|
title = link.contents[0]
|
||||||
download_url = self.urls['download'] % (link['href'])
|
download_url = self.urls['download'] % (url['href'])
|
||||||
id = torrent_id
|
id = link['href'].replace('torrents.php?id=', '').split('&')[0]
|
||||||
seeders = cells[6].contents[0]
|
seeders = cells[len(cells)-2].string
|
||||||
leechers = cells[7].contents[0]
|
leechers = cells[len(cells)-1].string
|
||||||
except (AttributeError, TypeError):
|
except (AttributeError, TypeError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user