From 26535e3c5e61a4e8c2448ff3e6dae46bf5497266 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Fri, 3 Apr 2015 17:22:39 +0300 Subject: [PATCH] search fix --- resources/searchers/EZTV.py | 2 +- resources/searchers/OldPirateBay.py | 8 ++++---- resources/searchers/{ => unused}/OpenSharing.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename resources/searchers/{ => unused}/OpenSharing.py (99%) diff --git a/resources/searchers/EZTV.py b/resources/searchers/EZTV.py index 22b68d3..2ad7794 100644 --- a/resources/searchers/EZTV.py +++ b/resources/searchers/EZTV.py @@ -69,7 +69,7 @@ class EZTV(SearcherABC.SearcherABC): 'search':'Search'} headers = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'https://eztv.it/'), ('Accept-encoding', 'gzip'), ] + ('Referer', 'https://eztv.ch/'), ('Accept-encoding', 'gzip'), ] response = self.makeRequest(url, data=data, headers=headers) if None != response and 0 < len(response): diff --git a/resources/searchers/OldPirateBay.py b/resources/searchers/OldPirateBay.py index 67db82d..ded1764 100644 --- a/resources/searchers/OldPirateBay.py +++ b/resources/searchers/OldPirateBay.py @@ -73,13 +73,13 @@ class OldPirateBay(SearcherABC.SearcherABC): if None != response and 0 < len(response): #print response dat = re.compile( - r'''.+?(.+?).+?.+?(.+?)(.+?)(.+?)(.+?)''', re.DOTALL).findall(response) - for (link, title, size, seeds, leechers) in dat: + for (title, link, age, size, seeds, leechers) in dat: torrentTitle = title #"%s [S\L: %s\%s]" % (title, seeds, leechers) - size = size.replace(' ', ' ') + size = self.unescape(self.stripHtml(size)) image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://torrent.oldpiratebay.org/download.php?id=0&hash=%s' % link + link = self.unescape(link) filesList.append(( int(int(self.sourceWeight) * int(seeds)), int(seeds), int(leechers), size, diff --git a/resources/searchers/OpenSharing.py b/resources/searchers/unused/OpenSharing.py similarity index 99% rename from resources/searchers/OpenSharing.py rename to resources/searchers/unused/OpenSharing.py index 5e389bb..31ae4a5 100644 --- a/resources/searchers/OpenSharing.py +++ b/resources/searchers/unused/OpenSharing.py @@ -72,7 +72,7 @@ class OpenSharing(SearcherABC.SearcherABC): response = self.makeRequest(url, headers=headers) if None != response and 0 < len(response): - #print response + print response dat = re.compile( r'.+?.+?(.+?).+? (\d+).+?alt="leechers".+?>.+? (\d+).+?(.+?)