mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Merge pull request #815 from JackDandy/feature/FixPiSexy
Fix PiSexy for vip user class.
This commit is contained in:
commit
21f1cb2714
2 changed files with 6 additions and 2 deletions
|
@ -219,6 +219,7 @@
|
|||
* Change logging for newznab response code 910 and add check for empty response data
|
||||
* Change improve reverse proxy web_root support
|
||||
* Fix "error trying to retrieve image" from tvdb due to there is no image to fetch
|
||||
* Fix PiSexy for vip user class
|
||||
|
||||
|
||||
### 0.11.16 (2016-10-16 17:30:00 UTC)
|
||||
|
|
|
@ -73,12 +73,15 @@ class PiSexyProvider(generic.TorrentProvider):
|
|||
if 2 > len(torrent_rows):
|
||||
raise generic.HaltParseException
|
||||
|
||||
header = torrent_rows[0].find_all('td')
|
||||
peers_td = ([x.get_text().strip().lower() for x in header].index('see/lee') - len(header))
|
||||
size_td = ([x.get_text().strip().lower() for x in header].index('size'))
|
||||
for tr in torrent_rows[1:]:
|
||||
cells = tr.find_all('td')
|
||||
if 5 > len(cells):
|
||||
continue
|
||||
try:
|
||||
seeders, leechers = 2 * [cells[-4].get_text().strip()]
|
||||
seeders, leechers = 2 * [cells[peers_td].get_text().strip()]
|
||||
seeders, leechers = [tryInt(n) for n in [
|
||||
rc['seeders'].findall(seeders)[0], rc['leechers'].findall(leechers)[0]]]
|
||||
if self._peers_fail(mode, seeders, leechers) or not tr.find('a', href=rc['valid_cat']) \
|
||||
|
@ -87,7 +90,7 @@ class PiSexyProvider(generic.TorrentProvider):
|
|||
|
||||
info = tr.find('a', href=rc['info'])
|
||||
title = (rc['title'].sub('', info.attrs.get('title', '')) or info.get_text()).strip()
|
||||
size = cells[3].get_text().strip()
|
||||
size = cells[size_td].get_text().strip()
|
||||
download_url = self._link(tr.find('a', href=rc['get'])['href'])
|
||||
except (AttributeError, TypeError, ValueError, KeyError, IndexError):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue