mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Merge pull request #758 from JackDandy/feature/ChangePrivateHD
Change PrivateHD torrent provider.
This commit is contained in:
commit
70f4694ea9
2 changed files with 6 additions and 5 deletions
|
@ -124,6 +124,7 @@
|
||||||
* Change send nzb data to NZBGet for Anizb instead of url
|
* Change send nzb data to NZBGet for Anizb instead of url
|
||||||
* Change revert test_common.py include file placement so Travis builds don't fail
|
* Change revert test_common.py include file placement so Travis builds don't fail
|
||||||
* Fix Nyaa and TT torrent providers
|
* Fix Nyaa and TT torrent providers
|
||||||
|
* Change PrivateHD torrent provider
|
||||||
|
|
||||||
|
|
||||||
### 0.11.14 (2016-07-25 03:10:00 UTC)
|
### 0.11.14 (2016-07-25 03:10:00 UTC)
|
||||||
|
|
|
@ -35,7 +35,7 @@ class PrivateHDProvider(generic.TorrentProvider):
|
||||||
'login_action': self.url_base + 'auth/login',
|
'login_action': self.url_base + 'auth/login',
|
||||||
'search': self.url_base + 'torrents?%s' % '&'.join(
|
'search': self.url_base + 'torrents?%s' % '&'.join(
|
||||||
['in=1', 'tags=', 'type=2', 'language=0', 'subtitle=0', 'rip_type=0',
|
['in=1', 'tags=', 'type=2', 'language=0', 'subtitle=0', 'rip_type=0',
|
||||||
'video_quality=0', 'uploader=', 'search=%s', 'tv_type=%s', 'discount=%s'])}
|
'video_quality=0', 'uploader=', 'search=%s', 'tv_type[]=%s', 'discount[]=%s'])}
|
||||||
|
|
||||||
self.categories = {'Season': [2], 'Episode': [1], 'Cache': [0]}
|
self.categories = {'Season': [2], 'Episode': [1], 'Cache': [0]}
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ class PrivateHDProvider(generic.TorrentProvider):
|
||||||
def _authorised(self, **kwargs):
|
def _authorised(self, **kwargs):
|
||||||
|
|
||||||
return super(PrivateHDProvider, self)._authorised(
|
return super(PrivateHDProvider, self)._authorised(
|
||||||
logged_in=lambda x=None: self.has_all_cookies(['privatehdlove']),
|
logged_in=lambda x=None: self.has_all_cookies(['love']),
|
||||||
post_params={'username_email': self.username})
|
post_params={'email_username': self.username})
|
||||||
|
|
||||||
def _search_provider(self, search_params, **kwargs):
|
def _search_provider(self, search_params, **kwargs):
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ class PrivateHDProvider(generic.TorrentProvider):
|
||||||
for tr in torrent_rows[1:]:
|
for tr in torrent_rows[1:]:
|
||||||
try:
|
try:
|
||||||
seeders, leechers, size = [tryInt(n, n) for n in [
|
seeders, leechers, size = [tryInt(n, n) for n in [
|
||||||
(tr.find_all('td')[x].get_text().strip()) for x in (-3, -2, -5)]]
|
(tr.find_all('td')[x].get_text().strip()) for x in (-3, -2, -4)]]
|
||||||
if self._peers_fail(mode, seeders, leechers):
|
if self._peers_fail(mode, seeders, leechers):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
title = rc['info'].sub('', tr.find('a', attrs={'data-title': rc['info']})['data-title'])
|
title = rc['info'].sub('', tr.find('a', attrs={'title': rc['info']})['title'])
|
||||||
|
|
||||||
download_url = tr.find('a', href=rc['get'])['href']
|
download_url = tr.find('a', href=rc['get'])['href']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue