mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 19:12:26 -05:00
KickAss torrents now uses multiple urls to try from incase one goes down.
This commit is contained in:
parent
d6225dd8d3
commit
f925488373
@ -64,9 +64,7 @@ class KATProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
self.cache = KATCache(self)
|
self.cache = KATCache(self)
|
||||||
|
|
||||||
self.url = 'http://kickass.to/'
|
self.urls = ['http://kickass.to/', 'http://katproxy.com']
|
||||||
|
|
||||||
self.searchurl = self.url + 'usearch/%s/?field=seeders&sorder=desc' #order by seed
|
|
||||||
|
|
||||||
def isEnabled(self):
|
def isEnabled(self):
|
||||||
return self.enabled
|
return self.enabled
|
||||||
@ -232,14 +230,18 @@ class KATProvider(generic.TorrentProvider):
|
|||||||
for mode in search_params.keys():
|
for mode in search_params.keys():
|
||||||
for search_string in search_params[mode]:
|
for search_string in search_params[mode]:
|
||||||
|
|
||||||
if mode != 'RSS':
|
for url in self.urls:
|
||||||
searchURL = self.searchurl % (urllib.quote(unidecode(search_string)))
|
if mode != 'RSS':
|
||||||
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
searchURL = url + 'usearch/%s/?field=seeders&sorder=desc' % (urllib.quote(unidecode(search_string)))
|
||||||
else:
|
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
||||||
searchURL = self.url + 'tv/?field=time_add&sorder=desc'
|
else:
|
||||||
logger.log(u"KAT cache update URL: " + searchURL, logger.DEBUG)
|
searchURL = url + 'tv/?field=time_add&sorder=desc'
|
||||||
|
logger.log(u"KAT cache update URL: " + searchURL, logger.DEBUG)
|
||||||
|
|
||||||
|
html = self.getURL(searchURL)
|
||||||
|
if html:
|
||||||
|
break
|
||||||
|
|
||||||
html = self.getURL(searchURL)
|
|
||||||
if not html:
|
if not html:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user