Simplify KickAssTorrent search. fix #472
This commit is contained in:
1 parent
7f983c9530
commit
44096f7ca0
1 file changed
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from couchpotato.core.event import fireEvent
|
from couchpotato.core.event import fireEvent
|
||||||
from couchpotato.core.helpers.variable import tryInt, getTitle
|
from couchpotato.core.helpers.variable import tryInt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
from couchpotato.core.providers.torrent.base import TorrentProvider
|
from couchpotato.core.providers.torrent.base import TorrentProvider
|
||||||
import StringIO
|
import StringIO
|
||||||
@@ -16,7 +16,7 @@ class KickAssTorrents(TorrentProvider):
|
|||||||
urls = {
|
urls = {
|
||||||
'test': 'http://www.kat.ph/',
|
'test': 'http://www.kat.ph/',
|
||||||
'detail': 'http://www.kat.ph/%s-t%s.html',
|
'detail': 'http://www.kat.ph/%s-t%s.html',
|
||||||
'search': 'http://www.kat.ph/%s-i%s/',
|
'search': 'http://www.kat.ph/i%s/',
|
||||||
'download': 'http://torcache.net/',
|
'download': 'http://torcache.net/',
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class KickAssTorrents(TorrentProvider):
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
cache_key = 'kickasstorrents.%s.%s' % (movie['library']['identifier'], quality.get('identifier'))
|
cache_key = 'kickasstorrents.%s.%s' % (movie['library']['identifier'], quality.get('identifier'))
|
||||||
data = self.getCache(cache_key, self.urls['search'] % (getTitle(movie['library']), movie['library']['identifier'].replace('tt', '')))
|
data = self.getCache(cache_key, self.urls['search'] % (movie['library']['identifier'].replace('tt', '')))
|
||||||
if data:
|
if data:
|
||||||
|
|
||||||
cat_ids = self.getCatId(quality['identifier'])
|
cat_ids = self.getCatId(quality['identifier'])
|
||||||
|
|||||||
Reference in new issue
Block a user