mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 05:27:15 +03:00
- Fixed BTJunkie search engine
- Category support for TorrentReactor engine
This commit is contained in:
parent
3d88b7b05c
commit
941d9b9bd9
3 changed files with 8 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
#VERSION: 2.20
|
||||
#VERSION: 2.21
|
||||
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -98,7 +98,7 @@ class btjunkie(object):
|
|||
while True and i<11:
|
||||
results = []
|
||||
parser = self.SimpleSGMLParser(results, self.url)
|
||||
dat = retrieve_url(self.url+'/search?q=%s&c=%s&o=52&p=%d'%(what, cat, i))
|
||||
dat = retrieve_url(self.url+'/search?q=%s&c=%s&o=52&p=%d'%(what, self.supported_categories[cat], i))
|
||||
# Remove <font> tags from page
|
||||
p = re.compile( '<[/]?font.*?>')
|
||||
dat = p.sub('', dat)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#VERSION: 1.11
|
||||
#VERSION: 1.20
|
||||
#AUTHORS: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
||||
#CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -32,6 +33,7 @@ from helpers import retrieve_url, download_file
|
|||
class torrentreactor(object):
|
||||
url = 'http://www.torrentreactor.net'
|
||||
name = 'TorrentReactor.Net'
|
||||
supported_categories = {'all': '', 'movies': '5', 'tv': '8', 'music': '6', 'games': '3', 'anime': '1', 'software': '2'}
|
||||
|
||||
def download_torrent(self, info):
|
||||
print download_file(info)
|
||||
|
@ -90,12 +92,12 @@ class torrentreactor(object):
|
|||
self.results = []
|
||||
self.parser = self.SimpleSGMLParser(self.results, self.url)
|
||||
|
||||
def search(self, what):
|
||||
def search(self, what, cat='all'):
|
||||
i = 0
|
||||
while True and i<11:
|
||||
results = []
|
||||
parser = self.SimpleSGMLParser(results, self.url)
|
||||
dat = retrieve_url(self.url+'/search.php?search=&words=%s&cid=&sid=&type=2&orderby=a.seeds&asc=0&skip=%s'%(what,(i*35)))
|
||||
dat = retrieve_url(self.url+'/search.php?search=&words=%s&cid=%s&sid=&type=2&orderby=a.seeds&asc=0&skip=%s'%(what, self.supported_categories[cat], (i*35)))
|
||||
parser.feed(dat)
|
||||
parser.close()
|
||||
if len(results) <= 0:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
isohunt: 1.21
|
||||
torrentreactor: 1.11
|
||||
btjunkie: 2.20
|
||||
btjunkie: 2.21
|
||||
mininova: 1.31
|
||||
piratebay: 1.11
|
||||
|
|
Loading…
Reference in a new issue