mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-24 19:19:56 +00:00
added piratebay proxy, sorted by seeds
many Internet Service Providers block piratebay website, therefore the only option is to use a proxy
This commit is contained in:
parent
bb4b001fb6
commit
957c25c032
1 changed files with 22 additions and 0 deletions
|
@ -50,6 +50,28 @@ class TPB(Search):
|
||||||
'leechers': leechers,
|
'leechers': leechers,
|
||||||
})
|
})
|
||||||
return torrents
|
return torrents
|
||||||
|
class TPBproxy(Search):
|
||||||
|
def __init__(self):
|
||||||
|
self.search_uri = 'http://pirateproxy.net/search/%s/0/7/0'
|
||||||
|
def search(self, terms):
|
||||||
|
torrents = []
|
||||||
|
url = self.search_uri % '+'.join(terms.split(' '))
|
||||||
|
f = urlopen(url)
|
||||||
|
soup = BeautifulSoup(f.read())
|
||||||
|
for details in soup.findAll('a', {'class': 'detLink'}):
|
||||||
|
name = details.text
|
||||||
|
url = details.findNext('a', {'href': re.compile('^magnet:')})['href']
|
||||||
|
td = details.findNext('td')
|
||||||
|
seeds = int(td.text)
|
||||||
|
td = td.findNext('td')
|
||||||
|
leechers = int(td.text)
|
||||||
|
torrents.append({
|
||||||
|
'url': url,
|
||||||
|
'name': name,
|
||||||
|
'seeds': seeds,
|
||||||
|
'leechers': leechers,
|
||||||
|
})
|
||||||
|
return torrents
|
||||||
class TorrentReactor(Search):
|
class TorrentReactor(Search):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.search_uri = 'http://www.torrentreactor.net/rss.php?search=%s'
|
self.search_uri = 'http://www.torrentreactor.net/rss.php?search=%s'
|
||||||
|
|
Loading…
Reference in a new issue