From 8c6c430eea828429ee7a3a3b355d97a6ec03efd5 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Wed, 27 Feb 2013 19:31:20 +0100 Subject: [PATCH] kickass url correction --- modules/kickass/pages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/kickass/pages.py b/modules/kickass/pages.py index d9c99bd2..b6f0b255 100644 --- a/modules/kickass/pages.py +++ b/modules/kickass/pages.py @@ -52,6 +52,8 @@ class TorrentsPage(BasePage): for a in tr.getchildren()[0].getiterator('a'): if '.torrent' in a.attrib.get('href', ''): url = a.attrib['href'] + if url.startswith('//'): + url = 'http:%s'%url size = tr.getchildren()[1].text u = tr.getchildren()[1].getchildren()[0].text @@ -104,7 +106,9 @@ class TorrentPage(BasePage): href = a.attrib.get('href', '') if href.startswith('magnet'): magnet = href - elif href.startswith('//') or href.startswith('http'): + elif href.startswith('//'): + url = 'http:%s'%href + elif href.startswith('http'): url = href size = 0