diff --git a/modules/kickass/browser.py b/modules/kickass/browser.py index 8307b774..441b1fff 100644 --- a/modules/kickass/browser.py +++ b/modules/kickass/browser.py @@ -28,25 +28,25 @@ __all__ = ['KickassBrowser'] class KickassBrowser(BaseBrowser): DOMAIN = 'ka.tt' - PROTOCOL = 'http' + PROTOCOL = 'https' ENCODING = 'utf-8' USER_AGENT = BaseBrowser.USER_AGENTS['wget'] PAGES = { - 'http://ka.tt/usearch/.*field=seeders&sorder=desc': TorrentsPage, - 'http://ka.tt/.*.html': TorrentPage, + 'https://ka.tt/usearch/.*field=seeders&sorder=desc': TorrentsPage, + 'https://ka.tt/.*.html': TorrentPage, } def home(self): - return self.location('http://ka.tt/') + return self.location('https://ka.tt/') def iter_torrents(self, pattern): - self.location('http://ka.tt/usearch/%s/?field=seeders&sorder=desc' % pattern.encode('utf-8')) + self.location('https://ka.tt/usearch/%s/?field=seeders&sorder=desc' % pattern.encode('utf-8')) assert self.is_on_page(TorrentsPage) return self.page.iter_torrents() def get_torrent(self, id): try: - self.location('http://ka.tt/%s.html' % id) + self.location('https://ka.tt/%s.html' % id) except BrowserHTTPNotFound: return if self.is_on_page(TorrentPage): diff --git a/modules/kickass/pages.py b/modules/kickass/pages.py index 5385ad2f..ea525b3a 100644 --- a/modules/kickass/pages.py +++ b/modules/kickass/pages.py @@ -60,7 +60,7 @@ class TorrentsPage(BasePage): elif href.startswith('http'): url = unicode(href) elif href.startswith('//'): - url = u'http:%s' % href + url = u'https:%s' % href size = tr.getchildren()[1].text u = tr.getchildren()[1].getchildren()[0].text @@ -116,7 +116,7 @@ class TorrentPage(BasePage): if href.startswith('magnet'): magnet = unicode(href) elif href.startswith('//'): - url = u'http:%s' % href + url = u'https:%s' % href elif href.startswith('http'): url = unicode(href)