search fix

pull/1/head
DiMartinoXBMC 2015-04-03 17:22:39 +03:00
parent 6567d634fb
commit 26535e3c5e
3 changed files with 6 additions and 6 deletions

View File

@ -69,7 +69,7 @@ class EZTV(SearcherABC.SearcherABC):
'search':'Search'} 'search':'Search'}
headers = [('User-Agent', 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'), '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) response = self.makeRequest(url, data=data, headers=headers)
if None != response and 0 < len(response): if None != response and 0 < len(response):

View File

@ -73,13 +73,13 @@ class OldPirateBay(SearcherABC.SearcherABC):
if None != response and 0 < len(response): if None != response and 0 < len(response):
#print response #print response
dat = re.compile( dat = re.compile(
r'''<td class="title-row">.+?<a href='magnet:\?xt=urn:btih:(.+?)&amp.+?<span>(.+?)</span></a>.+?<td class="size-row">(.+?)</td><td class="seeders.+?">(\d+)</td><td class="leechers.+?">(\d+)</td></tr>''', r'''<a href="/torrent/.+?">(.+?)</a>.+?<a class=".+?" href="(.+?)" title="TORRENT LINK">.+?<td .+?>(.+?)</td><td class=".+?">(.+?)</td><td class=".+?">(.+?)</td><td .+?>(.+?)</td></tr>''',
re.DOTALL).findall(response) 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) torrentTitle = title #"%s [S\L: %s\%s]" % (title, seeds, leechers)
size = size.replace('&nbsp;', ' ') size = self.unescape(self.stripHtml(size))
image = sys.modules["__main__"].__root__ + self.searchIcon 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(( filesList.append((
int(int(self.sourceWeight) * int(seeds)), int(int(self.sourceWeight) * int(seeds)),
int(seeds), int(leechers), size, int(seeds), int(leechers), size,

View File

@ -72,7 +72,7 @@ class OpenSharing(SearcherABC.SearcherABC):
response = self.makeRequest(url, headers=headers) response = self.makeRequest(url, headers=headers)
if None != response and 0 < len(response): if None != response and 0 < len(response):
#print response print response
dat = re.compile( dat = re.compile(
r'<tr class="\w\w\w".+?<a href="magnet.+?">.+?<a class="downgif" href="(/download/\d+?/)">.+?<a .+?">(.+?)</a></td>.+?<img .+?alt="seeders".+?>&nbsp;(\d+)</span>.+?alt="leechers".+?>.+?&nbsp;(\d+)</span>.+?<td align="right">(.+?)</td><td', r'<tr class="\w\w\w".+?<a href="magnet.+?">.+?<a class="downgif" href="(/download/\d+?/)">.+?<a .+?">(.+?)</a></td>.+?<img .+?alt="seeders".+?>&nbsp;(\d+)</span>.+?alt="leechers".+?>.+?&nbsp;(\d+)</span>.+?<td align="right">(.+?)</td><td',
re.DOTALL | re.I).findall(response) re.DOTALL | re.I).findall(response)