fix title detection

This commit is contained in:
Tomasz Długosz 2012-11-29 22:20:35 +01:00
parent f21f73dbfa
commit 490c3cc56f

View File

@ -52,13 +52,11 @@ class PublioStore(BasicStoreConfig, StorePlugin):
continue continue
cover_url = ''.join(data.xpath('.//div[@class="img"]/a/img/@data-original')) cover_url = ''.join(data.xpath('.//div[@class="img"]/a/img/@data-original'))
# TODO: fix highlight handling title = ''.join(data.xpath('.//div[@class="img"]/a/@title'))
title = ''.join(data.xpath('.//div[@class="desc"]/h4/a/text()')) title2 = ''.join(data.xpath('.//div[@class="desc"]/h5//text()'))
title2 = ''.join(data.xpath('.//div[@class="desc"]/h5/a/text()'))
if title2: if title2:
title = title + '. ' + title2 title = title + '. ' + title2
if (''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/span/text()')).strip() == "Seria:"): 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')) series = ''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/a/@title'))
title = title + ' (seria ' + series + ')' title = title + ' (seria ' + series + ')'
author = ', '.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[@class="row"][1]/a/@title')) author = ', '.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[@class="row"][1]/a/@title'))