Browse Source

Use new kat.ph url. fix #959

Also use https while we're at it.
pull/992/merge
Ruud 13 years ago
parent
commit
a432ad4f5a
  1. 13
      couchpotato/core/providers/torrent/kickasstorrents/main.py

13
couchpotato/core/providers/torrent/kickasstorrents/main.py

@ -1,6 +1,7 @@
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 from couchpotato.core.helpers.encoding import simplifyString
from couchpotato.core.helpers.variable import tryInt, getTitle
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 re import re
@ -12,9 +13,9 @@ log = CPLog(__name__)
class KickAssTorrents(TorrentProvider): class KickAssTorrents(TorrentProvider):
urls = { urls = {
'test': 'http://kat.ph/', 'test': 'https://kat.ph/',
'detail': 'http://kat.ph/%s', 'detail': 'https://kat.ph/%s',
'search': 'http://kat.ph/i%s/', 'search': 'https://kat.ph/%s-i%s/',
} }
cat_ids = [ cat_ids = [
@ -35,8 +36,10 @@ class KickAssTorrents(TorrentProvider):
if self.isDisabled(): if self.isDisabled():
return results return results
title = simplifyString(getTitle(movie['library'])).replace(' ', '-')
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'] % (movie['library']['identifier'].replace('tt', ''))) data = self.getCache(cache_key, self.urls['search'] % (title, movie['library']['identifier'].replace('tt', '')))
if data: if data:
cat_ids = self.getCatId(quality['identifier']) cat_ids = self.getCatId(quality['identifier'])

Loading…
Cancel
Save