[isohunt] filenames OK
This commit is contained in:
parent
55174e4538
commit
e7188bfdff
1 changed files with 21 additions and 4 deletions
|
|
@ -87,16 +87,33 @@ class TorrentPage(BasePage):
|
||||||
seed = span.tail.split(' ')[1]
|
seed = span.tail.split(' ')[1]
|
||||||
break
|
break
|
||||||
leech = 0
|
leech = 0
|
||||||
|
|
||||||
|
files = []
|
||||||
|
count_p_found = 0
|
||||||
for p in self.document.getiterator('p'):
|
for p in self.document.getiterator('p'):
|
||||||
if p.attrib.get('style','') == "line-height:1.2em;margin-top:1.8em":
|
if p.attrib.get('style','') == "line-height:1.2em;margin-top:1.8em":
|
||||||
description = p.getchildren()[1].tail
|
count_p_found += 1
|
||||||
break
|
if count_p_found == 1:
|
||||||
|
description = p.getchildren()[1].tail
|
||||||
|
if count_p_found == 2:
|
||||||
|
if p.getchildren()[0].text == 'Directory:':
|
||||||
|
files.append(p.getchildren()[0].tail.strip()+'/')
|
||||||
|
else:
|
||||||
|
files.append(p.getchildren()[0].tail.strip())
|
||||||
|
|
||||||
# TODO marche pas
|
# TODO marche pas
|
||||||
files = []
|
|
||||||
for td in self.document.getiterator('td'):
|
for td in self.document.getiterator('td'):
|
||||||
print td.attrib.get('class')
|
print td.attrib.get('class')
|
||||||
if td.attrib.get('class','') == 'fileRows':
|
if td.attrib.get('class','') == 'fileRows':
|
||||||
files.append(td.text)
|
#files.append(td.text)
|
||||||
|
filename = td.text
|
||||||
|
print "len"+str(len(td.getchildren()))
|
||||||
|
for slash in td.getchildren():
|
||||||
|
filename += '/'
|
||||||
|
filename += slash.tail
|
||||||
|
files.append(filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO leechers
|
# TODO leechers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue