mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
- Added multipage support for mininova
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#VERSION: 1.00
|
#VERSION: 1.10
|
||||||
#AUTHORS: Fabien Devaux (fab@gnux.info)
|
#AUTHORS: Fabien Devaux (fab@gnux.info)
|
||||||
from novaprinter import prettyPrinter
|
from novaprinter import prettyPrinter
|
||||||
import urllib
|
import urllib
|
||||||
@@ -26,9 +26,13 @@ class mininova(object):
|
|||||||
return txt.toxml()
|
return txt.toxml()
|
||||||
else:
|
else:
|
||||||
return ''.join([ get_text(n) for n in txt.childNodes])
|
return ''.join([ get_text(n) for n in txt.childNodes])
|
||||||
dat = urllib.urlopen(self.url+'/search/%s/seeds'%(what,)).read().decode('utf-8', 'replace')
|
page = 1
|
||||||
|
while True:
|
||||||
|
res = 0
|
||||||
|
dat = urllib.urlopen(self.url+'/search/%s/seeds/%d'%(what, page)).read().decode('utf-8', 'replace')
|
||||||
dat = re.sub("<a href=\"http://www.boardreader.com/index.php.*\"", "<a href=\"plop\"", dat)
|
dat = re.sub("<a href=\"http://www.boardreader.com/index.php.*\"", "<a href=\"plop\"", dat)
|
||||||
dat = re.sub("<=", "<=", dat)
|
dat = re.sub("<=", "<=", dat)
|
||||||
|
dat = re.sub("&\s", "& ", dat)
|
||||||
x = minidom.parseString(dat.encode('utf-8', 'replace'))
|
x = minidom.parseString(dat.encode('utf-8', 'replace'))
|
||||||
table = x.getElementsByTagName('table').item(0)
|
table = x.getElementsByTagName('table').item(0)
|
||||||
if not table: return
|
if not table: return
|
||||||
@@ -48,3 +52,7 @@ class mininova(object):
|
|||||||
if not vals['leech'].isdigit():
|
if not vals['leech'].isdigit():
|
||||||
vals['leech'] = 0
|
vals['leech'] = 0
|
||||||
prettyPrinter(vals)
|
prettyPrinter(vals)
|
||||||
|
res = res + 1
|
||||||
|
if res == 0:
|
||||||
|
break
|
||||||
|
page = page +1
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
isohunt: 1.00
|
isohunt: 1.00
|
||||||
torrentreactor: 1.00
|
torrentreactor: 1.00
|
||||||
btjunkie: 1.10
|
btjunkie: 1.10
|
||||||
mininova: 1.00
|
mininova: 1.10
|
||||||
piratebay: 1.00
|
piratebay: 1.00
|
||||||
Reference in New Issue
Block a user