mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Change logged in and a fail-over signature.
This commit is contained in:
parent
644c7193f8
commit
4fb5d6ea90
5 changed files with 17 additions and 5 deletions
|
@ -922,7 +922,6 @@ class TorrentProvider(object, GenericProvider):
|
||||||
if self.password not in post_params.values():
|
if self.password not in post_params.values():
|
||||||
post_params['password'] = self.password
|
post_params['password'] = self.password
|
||||||
|
|
||||||
|
|
||||||
response = helpers.getURL(url, post_data=post_params, session=self.session, timeout=timeout)
|
response = helpers.getURL(url, post_data=post_params, session=self.session, timeout=timeout)
|
||||||
if response:
|
if response:
|
||||||
if logged_in(response):
|
if logged_in(response):
|
||||||
|
|
|
@ -44,10 +44,14 @@ class IPTorrentsProvider(generic.TorrentProvider):
|
||||||
def _authorised(self, **kwargs):
|
def _authorised(self, **kwargs):
|
||||||
|
|
||||||
return super(IPTorrentsProvider, self)._authorised(
|
return super(IPTorrentsProvider, self)._authorised(
|
||||||
logged_in=(lambda x=None: (None is x or 'RSS Link' in x) and self.has_all_cookies() and
|
logged_in=(lambda x='': ('RSS Link' in x) and self.has_all_cookies() and
|
||||||
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
||||||
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _has_signature(data=None):
|
||||||
|
return generic.TorrentProvider._has_signature(data) or (data and re.search(r'(?i)<title[^<]+?ipt', data))
|
||||||
|
|
||||||
def _search_provider(self, search_params, **kwargs):
|
def _search_provider(self, search_params, **kwargs):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
|
@ -49,7 +49,7 @@ class KATProvider(generic.TorrentProvider):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _has_signature(data=None):
|
def _has_signature(data=None):
|
||||||
return data and (re.search(r'(?sim)(<title>KAT)', data[15:1024:]) or 'kastatic' in data)
|
return data and (re.search(r'(?sim)(<title>KAT)', data[15:1024:]) or 'kastat' in data)
|
||||||
|
|
||||||
def _find_season_quality(self, title, torrent_link, ep_number):
|
def _find_season_quality(self, title, torrent_link, ep_number):
|
||||||
""" Return the modified title of a Season Torrent with the quality found inspecting torrent file list """
|
""" Return the modified title of a Season Torrent with the quality found inspecting torrent file list """
|
||||||
|
|
|
@ -45,10 +45,15 @@ class TorrentDayProvider(generic.TorrentProvider):
|
||||||
def _authorised(self, **kwargs):
|
def _authorised(self, **kwargs):
|
||||||
|
|
||||||
return super(TorrentDayProvider, self)._authorised(
|
return super(TorrentDayProvider, self)._authorised(
|
||||||
logged_in=(lambda x=None: (None is x or 'RSS URL' in x) and self.has_all_cookies() and
|
logged_in=(lambda x='': ('RSS URL' in x) and self.has_all_cookies() and
|
||||||
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
||||||
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _has_signature(data=None):
|
||||||
|
return generic.TorrentProvider._has_signature(data) or \
|
||||||
|
(data and re.search(r'(?i)<title[^<]+?(td|torrentday)', data))
|
||||||
|
|
||||||
def _search_provider(self, search_params, **kwargs):
|
def _search_provider(self, search_params, **kwargs):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
|
@ -43,10 +43,14 @@ class TorrentingProvider(generic.TorrentProvider):
|
||||||
def _authorised(self, **kwargs):
|
def _authorised(self, **kwargs):
|
||||||
|
|
||||||
return super(TorrentingProvider, self)._authorised(
|
return super(TorrentingProvider, self)._authorised(
|
||||||
logged_in=(lambda x=None: (None is x or 'RSS link' in x) and self.has_all_cookies() and
|
logged_in=(lambda x='': ('RSS link' in x) and self.has_all_cookies() and
|
||||||
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
|
||||||
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _has_signature(data=None):
|
||||||
|
return generic.TorrentProvider._has_signature(data) or (data and re.search(r'(?i)<title[^<]+?Torrenting', data))
|
||||||
|
|
||||||
def _search_provider(self, search_params, **kwargs):
|
def _search_provider(self, search_params, **kwargs):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
Loading…
Reference in a new issue