Fix title getter (TorrentsPage and TorrentPage)
This commit is contained in:
parent
a9d4cfdc66
commit
1f17d9f265
1 changed files with 4 additions and 4 deletions
|
|
@ -37,11 +37,11 @@ class TorrentsPage(BasePage):
|
||||||
url = NotAvailable
|
url = NotAvailable
|
||||||
if not 'id' in tr.attrib:
|
if not 'id' in tr.attrib:
|
||||||
continue
|
continue
|
||||||
title = tr.getchildren()[0].getchildren()[1].getchildren()[1].text
|
title = tr.find('.//a[@class="cellMainLink"]')
|
||||||
if not title:
|
if title is None:
|
||||||
title = u''
|
title = u''
|
||||||
else:
|
else:
|
||||||
title = unicode(title)
|
title = unicode(title.text)
|
||||||
for red in tr.getchildren()[0].getchildren()[1].getchildren()[1].getchildren():
|
for red in tr.getchildren()[0].getchildren()[1].getchildren()[1].getchildren():
|
||||||
title += red.text_content()
|
title += red.text_content()
|
||||||
idt = tr.getchildren()[0].getchildren()[1].getchildren()[1].attrib.get('href', '').replace('/', '') \
|
idt = tr.getchildren()[0].getchildren()[1].getchildren()[1].attrib.get('href', '').replace('/', '') \
|
||||||
|
|
@ -102,7 +102,7 @@ class TorrentPage(BasePage):
|
||||||
leech = 0
|
leech = 0
|
||||||
|
|
||||||
title = self.parser.select(self.document.getroot(),
|
title = self.parser.select(self.document.getroot(),
|
||||||
'h1.torrentName span', 1)
|
'h1.novertmarg span', 1)
|
||||||
title = unicode(title.text)
|
title = unicode(title.text)
|
||||||
|
|
||||||
for a in self.parser.select(self.document.getroot(),
|
for a in self.parser.select(self.document.getroot(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue