Browse Source

- Fixed torrent names in mininova search engine

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
1b7449ef4e
  1. 14
      src/search_engine/engines/mininova.py
  2. 2
      src/search_engine/engines/versions.txt

14
src/search_engine/engines/mininova.py

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#VERSION: 1.12
#VERSION: 1.13
#AUTHORS: Fabien Devaux (fab@gnux.info)
from novaprinter import prettyPrinter
import urllib
@ -23,6 +23,16 @@ class mininova(object): @@ -23,6 +23,16 @@ class mininova(object):
return None
return (self.url+lnks.item(i).attributes.get('href').value).strip()
def get_name(lnk):
lnks = lnk.getElementsByTagName('a')
i = 0
try:
while not lnks.item(i).attributes.get('href').value.startswith('/tor'):
i += 1
except:
return None
return lnks.item(i).firstChild.toxml()
def get_text(txt):
if txt.nodeType == txt.TEXT_NODE:
return txt.toxml()
@ -46,6 +56,8 @@ class mininova(object): @@ -46,6 +56,8 @@ class mininova(object):
for td in tds:
if self.table_items[i] == 'name':
vals['link'] = get_link(td)
vals['name'] = get_name(td)
else:
vals[self.table_items[i]] = get_text(td).strip()
i += 1
vals['engine_url'] = self.url

2
src/search_engine/engines/versions.txt

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
isohunt: 1.01
torrentreactor: 1.02
btjunkie: 1.12
mininova: 1.12
mininova: 1.13
piratebay: 1.01

Loading…
Cancel
Save