Merge lp:~tomek3d/calibre/store into lp:calibre

Proposed by Tomasz Długosz
Status: Merged
Merged at revision: 13789
Proposed branch: lp:~tomek3d/calibre/store
Merge into: lp:calibre
Diff against target: 30 lines (+7/-4)
1 file modified
src/calibre/gui2/store/stores/publio_plugin.py (+7/-4)
To merge this branch: bzr merge lp:~tomek3d/calibre/store
Reviewer Review Type Date Requested Status
Kovid Goyal Pending
Review via email: mp+137056@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/calibre/gui2/store/stores/publio_plugin.py'
2--- src/calibre/gui2/store/stores/publio_plugin.py 2012-11-28 11:04:21 +0000
3+++ src/calibre/gui2/store/stores/publio_plugin.py 2012-11-29 21:39:20 +0000
4@@ -52,10 +52,13 @@
5 continue
6
7 cover_url = ''.join(data.xpath('.//div[@class="img"]/a/img/@data-original'))
8- title = ''.join(data.xpath('.//div[@class="desc"]/h4/a/text()'))
9- title2 = ''.join(data.xpath('.//div[@class="desc"]/h5/a/text()'))
10+ title = ''.join(data.xpath('.//div[@class="img"]/a/@title'))
11+ title2 = ''.join(data.xpath('.//div[@class="desc"]/h5//text()'))
12 if title2:
13 title = title + '. ' + title2
14+ if (''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/span/text()')).strip() == "Seria:"):
15+ series = ''.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[last()]/a/@title'))
16+ title = title + ' (seria ' + series + ')'
17 author = ', '.join(data.xpath('./div[@class="desc"]/div[@class="detailShortList"]/div[@class="row"][1]/a/@title'))
18 price = ''.join(data.xpath('.//div[@class="priceBoxContener "]/div/ins/text()'))
19 if not price:
20@@ -67,8 +70,8 @@
21 s = SearchResult()
22 s.cover_url = 'http://www.publio.pl' + cover_url
23 s.title = title.strip()
24- s.author = author.strip()
25- s.price = price.strip()
26+ s.author = author
27+ s.price = price
28 s.detail_item = 'http://www.publio.pl' + id.strip()
29 s.drm = SearchResult.DRM_LOCKED if 'DRM' in formats else SearchResult.DRM_UNLOCKED
30 s.formats = formats.replace(' DRM','').strip()

Subscribers

People subscribed via source and target branches