mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-04 21:23:39 +02:00
fix title detection
This commit is contained in:
parent
f21f73dbfa
commit
490c3cc56f
1 changed files with 2 additions and 4 deletions
|
|
@ -52,13 +52,11 @@ def search(self, query, max_results=20, timeout=60):
|
|||
continue
|
||||
|
||||
cover_url = ''.join(data.xpath('.//div[@class="img"]/a/img/@data-original'))
|
||||
# TODO: fix highlight handling
|
||||
title = ''.join(data.xpath('.//div[@class="desc"]/h4/a/text()'))
|
||||
title2 = ''.join(data.xpath('.//div[@class="desc"]/h5/a/text()'))
|
||||
title = ''.join(data.xpath('.//div[@class="img"]/a/@title'))
|
||||
title2 = ''.join(data.xpath('.//div[@class="desc"]/h5//text()'))
|
||||
if title2:
|
||||
title = title + '. ' + title2
|
||||
if (''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/span/text()')).strip() == "Seria:"):
|
||||
# TODO: fix highlight handling
|
||||
series = ''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/a/@title'))
|
||||
title = title + ' (seria ' + series + ')'
|
||||
author = ', '.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[@class="row"][1]/a/@title'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue