fix parsing of title when empty
This commit is contained in:
parent
23c58d1db1
commit
a3740eb3f8
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ class TorrentsPage(BasePage):
|
||||||
if h2 is not None:
|
if h2 is not None:
|
||||||
title = h2.text or ''
|
title = h2.text or ''
|
||||||
if h2.find('a') != None:
|
if h2.find('a') != None:
|
||||||
title += h2.find('a').text + h2.find('a').tail
|
title += (h2.find('a').text or '') + (h2.find('a').tail or '')
|
||||||
else:
|
else:
|
||||||
title = self.browser.parser.select(table, 'div.title_text', 1).text
|
title = self.browser.parser.select(table, 'div.title_text', 1).text
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue