mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
- Fixed mininova search engie plugin
This commit is contained in:
parent
00dbf7ba38
commit
0678e2e2bd
1
TODO
1
TODO
@ -79,6 +79,7 @@ LANGUAGES UPDATED:
|
|||||||
- Bulgarian *OK*
|
- Bulgarian *OK*
|
||||||
|
|
||||||
rc1->rc2 changelog:
|
rc1->rc2 changelog:
|
||||||
|
- BUGFIX: Fixed mininova search engine plugin
|
||||||
- BUGFIX: Fixed infoBar text when adding a torrent
|
- BUGFIX: Fixed infoBar text when adding a torrent
|
||||||
- BUGFIX: Fixed a unsupported character in man page
|
- BUGFIX: Fixed a unsupported character in man page
|
||||||
- I18N: Updated Italian and Korean translations
|
- I18N: Updated Italian and Korean translations
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#VERSION: 1.10
|
#VERSION: 1.11
|
||||||
#AUTHORS: Fabien Devaux (fab@gnux.info)
|
#AUTHORS: Fabien Devaux (fab@gnux.info)
|
||||||
from novaprinter import prettyPrinter
|
from novaprinter import prettyPrinter
|
||||||
import urllib
|
import urllib
|
||||||
@ -15,11 +15,13 @@ class mininova(object):
|
|||||||
|
|
||||||
def get_link(lnk):
|
def get_link(lnk):
|
||||||
lnks = lnk.getElementsByTagName('a')
|
lnks = lnk.getElementsByTagName('a')
|
||||||
if lnks.item(0).attributes.get('href').value.startswith('/faq'):
|
i = 0
|
||||||
if len(lnks) > 1:
|
try:
|
||||||
return self.url+lnks.item(1).attributes.get('href').value
|
while not lnks.item(i).attributes.get('href').value.startswith('/get'):
|
||||||
else:
|
i += 1
|
||||||
return self.url+lnks.item(0).attributes.get('href').value
|
except:
|
||||||
|
return None
|
||||||
|
return (self.url+lnks.item(i).attributes.get('href').value).strip()
|
||||||
|
|
||||||
def get_text(txt):
|
def get_text(txt):
|
||||||
if txt.nodeType == txt.TEXT_NODE:
|
if txt.nodeType == txt.TEXT_NODE:
|
||||||
@ -43,7 +45,7 @@ class mininova(object):
|
|||||||
vals = {}
|
vals = {}
|
||||||
for td in tds:
|
for td in tds:
|
||||||
if self.table_items[i] == 'name':
|
if self.table_items[i] == 'name':
|
||||||
vals['link'] = get_link(td).strip()
|
vals['link'] = get_link(td)
|
||||||
vals[self.table_items[i]] = get_text(td).strip()
|
vals[self.table_items[i]] = get_text(td).strip()
|
||||||
i += 1
|
i += 1
|
||||||
vals['engine_url'] = self.url
|
vals['engine_url'] = self.url
|
||||||
@ -51,6 +53,8 @@ class mininova(object):
|
|||||||
vals['seeds'] = 0
|
vals['seeds'] = 0
|
||||||
if not vals['leech'].isdigit():
|
if not vals['leech'].isdigit():
|
||||||
vals['leech'] = 0
|
vals['leech'] = 0
|
||||||
|
if vals['link'] is None:
|
||||||
|
continue
|
||||||
prettyPrinter(vals)
|
prettyPrinter(vals)
|
||||||
res = res + 1
|
res = res + 1
|
||||||
if res == 0:
|
if res == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user