mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 15:04:36 +00:00
- Fixed BTJunkie search engine
- Category support for TorrentReactor engine
This commit is contained in:
parent
3d88b7b05c
commit
941d9b9bd9
@ -1,4 +1,4 @@
|
|||||||
#VERSION: 2.20
|
#VERSION: 2.21
|
||||||
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -98,7 +98,7 @@ class btjunkie(object):
|
|||||||
while True and i<11:
|
while True and i<11:
|
||||||
results = []
|
results = []
|
||||||
parser = self.SimpleSGMLParser(results, self.url)
|
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
|
# Remove <font> tags from page
|
||||||
p = re.compile( '<[/]?font.*?>')
|
p = re.compile( '<[/]?font.*?>')
|
||||||
dat = p.sub('', dat)
|
dat = p.sub('', dat)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#VERSION: 1.11
|
#VERSION: 1.20
|
||||||
#AUTHORS: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
#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
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions are met:
|
# modification, are permitted provided that the following conditions are met:
|
||||||
@ -32,6 +33,7 @@ from helpers import retrieve_url, download_file
|
|||||||
class torrentreactor(object):
|
class torrentreactor(object):
|
||||||
url = 'http://www.torrentreactor.net'
|
url = 'http://www.torrentreactor.net'
|
||||||
name = '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):
|
def download_torrent(self, info):
|
||||||
print download_file(info)
|
print download_file(info)
|
||||||
@ -90,12 +92,12 @@ class torrentreactor(object):
|
|||||||
self.results = []
|
self.results = []
|
||||||
self.parser = self.SimpleSGMLParser(self.results, self.url)
|
self.parser = self.SimpleSGMLParser(self.results, self.url)
|
||||||
|
|
||||||
def search(self, what):
|
def search(self, what, cat='all'):
|
||||||
i = 0
|
i = 0
|
||||||
while True and i<11:
|
while True and i<11:
|
||||||
results = []
|
results = []
|
||||||
parser = self.SimpleSGMLParser(results, self.url)
|
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.feed(dat)
|
||||||
parser.close()
|
parser.close()
|
||||||
if len(results) <= 0:
|
if len(results) <= 0:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
isohunt: 1.21
|
isohunt: 1.21
|
||||||
torrentreactor: 1.11
|
torrentreactor: 1.11
|
||||||
btjunkie: 2.20
|
btjunkie: 2.21
|
||||||
mininova: 1.31
|
mininova: 1.31
|
||||||
piratebay: 1.11
|
piratebay: 1.11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user