Removed btjunkie.org search

This commit is contained in:
Correl Roush 2012-03-13 19:34:47 -04:00
parent 59610f8a74
commit a460bfab97
3 changed files with 0 additions and 23 deletions

View file

@ -17,7 +17,6 @@
<!-- Adding / Search -->
<string id="200">Browse for torrent file</string>
<string id="201">Search BTJunkie.org</string>
<string id="202">Search ThePirateBay.org</string>
<string id="203">Search Mininova.org</string>
<string id="204">Search Torrentreactor.net</string>

View file

@ -110,7 +110,6 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
# Add torrent
engines = [
(_(200), None),
(_(201), search.BTJunkie),
(_(202), search.TPB),
(_(203), search.Mininova),
(_(204), search.TorrentReactor),

View file

@ -11,27 +11,6 @@ class Search:
def search(terms):
return NotImplemented
class BTJunkie(Search):
def __init__(self):
self.search_uri = 'http://btjunkie.org/rss.xml?query=%s&o=52'
def search(self, terms):
torrents = []
url = self.search_uri % '+'.join(terms.split(' '))
f = urlopen(url)
soup = BeautifulStoneSoup(f.read())
for item in soup.findAll('item'):
(name, seeds, leechers) = re.findall('(.*?)\s+\[(\d+|X)\/(\d+|X)\]$', item.title.text)[0]
if seeds == 'X':
seeds = 0
if leechers == 'X':
leechers = 0
torrents.append({
'url': item.enclosure['url'],
'name': name,
'seeds': int(seeds),
'leechers': int(leechers),
})
return torrents
class Mininova(Search):
def __init__(self):
self.search_uri = 'http://www.mininova.org/rss/%s'