Merge lp:~user-none/calibre/dev into lp:calibre

Proposed by John Schember
Status: Merged
Merged at revision: 14701
Proposed branch: lp:~user-none/calibre/dev
Merge into: lp:calibre
Diff against target: 197 lines (+48/-18)
6 files modified
src/calibre/gui2/store/stores/amazon_de_plugin.py (+9/-3)
src/calibre/gui2/store/stores/amazon_es_plugin.py (+9/-3)
src/calibre/gui2/store/stores/amazon_fr_plugin.py (+9/-3)
src/calibre/gui2/store/stores/amazon_it_plugin.py (+9/-3)
src/calibre/gui2/store/stores/amazon_plugin.py (+3/-3)
src/calibre/gui2/store/stores/amazon_uk_plugin.py (+9/-3)
To merge this branch: bzr merge lp:~user-none/calibre/dev
Reviewer Review Type Date Requested Status
Kovid Goyal Pending
Review via email: mp+156343@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/amazon_de_plugin.py'
2--- src/calibre/gui2/store/stores/amazon_de_plugin.py 2013-02-27 10:38:38 +0000
3+++ src/calibre/gui2/store/stores/amazon_de_plugin.py 2013-04-01 12:39:24 +0000
4@@ -1,7 +1,7 @@
5 # -*- coding: utf-8 -*-
6
7 from __future__ import (unicode_literals, division, absolute_import, print_function)
8-store_version = 1 # Needed for dynamic plugin loading
9+store_version = 2 # Needed for dynamic plugin loading
10
11 __license__ = 'GPL 3'
12 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
13@@ -46,12 +46,18 @@
14 doc = html.fromstring(f.read())#.decode('latin-1', 'replace'))
15
16 data_xpath = '//div[contains(@class, "prod")]'
17- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
18+ # Results can be in a grid (table) or a column
19+ format_xpath = (
20+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
21+ '//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()')
22 asin_xpath = '@name'
23 cover_xpath = './/img[@class="productImage"]/@src'
24 title_xpath = './/h3[@class="newaps"]/a//text()'
25 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
26- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
27+ # Results can be in a grid (table) or a column
28+ price_xpath = (
29+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
30+ '//span[contains(@class, "lrg") and contains(@class, "bld")]/text()')
31
32 for data in doc.xpath(data_xpath):
33 if counter <= 0:
34
35=== modified file 'src/calibre/gui2/store/stores/amazon_es_plugin.py'
36--- src/calibre/gui2/store/stores/amazon_es_plugin.py 2013-02-27 10:38:38 +0000
37+++ src/calibre/gui2/store/stores/amazon_es_plugin.py 2013-04-01 12:39:24 +0000
38@@ -1,7 +1,7 @@
39 # -*- coding: utf-8 -*-
40
41 from __future__ import (unicode_literals, division, absolute_import, print_function)
42-store_version = 1 # Needed for dynamic plugin loading
43+store_version = 2 # Needed for dynamic plugin loading
44
45 __license__ = 'GPL 3'
46 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
47@@ -45,12 +45,18 @@
48 doc = html.fromstring(f.read())#.decode('latin-1', 'replace'))
49
50 data_xpath = '//div[contains(@class, "prod")]'
51- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
52+ # Results can be in a grid (table) or a column
53+ format_xpath = (
54+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
55+ '//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()')
56 asin_xpath = '@name'
57 cover_xpath = './/img[@class="productImage"]/@src'
58 title_xpath = './/h3[@class="newaps"]/a//text()'
59 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
60- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
61+ # Results can be in a grid (table) or a column
62+ price_xpath = (
63+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
64+ '//span[contains(@class, "lrg") and contains(@class, "bld")]/text()')
65
66 for data in doc.xpath(data_xpath):
67 if counter <= 0:
68
69=== modified file 'src/calibre/gui2/store/stores/amazon_fr_plugin.py'
70--- src/calibre/gui2/store/stores/amazon_fr_plugin.py 2013-02-27 10:38:38 +0000
71+++ src/calibre/gui2/store/stores/amazon_fr_plugin.py 2013-04-01 12:39:24 +0000
72@@ -1,7 +1,7 @@
73 # -*- coding: utf-8 -*-
74
75 from __future__ import (unicode_literals, division, absolute_import, print_function)
76-store_version = 1 # Needed for dynamic plugin loading
77+store_version = 2 # Needed for dynamic plugin loading
78
79 __license__ = 'GPL 3'
80 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
81@@ -46,12 +46,18 @@
82 doc = html.fromstring(f.read())#.decode('latin-1', 'replace'))
83
84 data_xpath = '//div[contains(@class, "prod")]'
85- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
86+ # Results can be in a grid (table) or a column
87+ format_xpath = (
88+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
89+ '//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()')
90 asin_xpath = '@name'
91 cover_xpath = './/img[@class="productImage"]/@src'
92 title_xpath = './/h3[@class="newaps"]/a//text()'
93 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
94- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
95+ # Results can be in a grid (table) or a column
96+ price_xpath = (
97+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
98+ '//span[contains(@class, "lrg") and contains(@class, "bld")]/text()')
99
100 for data in doc.xpath(data_xpath):
101 if counter <= 0:
102
103=== modified file 'src/calibre/gui2/store/stores/amazon_it_plugin.py'
104--- src/calibre/gui2/store/stores/amazon_it_plugin.py 2013-02-27 10:38:38 +0000
105+++ src/calibre/gui2/store/stores/amazon_it_plugin.py 2013-04-01 12:39:24 +0000
106@@ -1,7 +1,7 @@
107 # -*- coding: utf-8 -*-
108
109 from __future__ import (unicode_literals, division, absolute_import, print_function)
110-store_version = 1 # Needed for dynamic plugin loading
111+store_version = 2 # Needed for dynamic plugin loading
112
113 __license__ = 'GPL 3'
114 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
115@@ -45,12 +45,18 @@
116 doc = html.fromstring(f.read())#.decode('latin-1', 'replace'))
117
118 data_xpath = '//div[contains(@class, "prod")]'
119- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
120+ # Results can be in a grid (table) or a column
121+ format_xpath = (
122+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
123+ '//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()')
124 asin_xpath = '@name'
125 cover_xpath = './/img[@class="productImage"]/@src'
126 title_xpath = './/h3[@class="newaps"]/a//text()'
127 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
128- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
129+ # Results can be in a grid (table) or a column
130+ price_xpath = (
131+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
132+ '//span[contains(@class, "lrg") and contains(@class, "bld")]/text()')
133
134 for data in doc.xpath(data_xpath):
135 if counter <= 0:
136
137=== modified file 'src/calibre/gui2/store/stores/amazon_plugin.py'
138--- src/calibre/gui2/store/stores/amazon_plugin.py 2013-03-31 16:23:21 +0000
139+++ src/calibre/gui2/store/stores/amazon_plugin.py 2013-04-01 12:39:24 +0000
140@@ -1,7 +1,7 @@
141 # -*- coding: utf-8 -*-
142
143 from __future__ import (unicode_literals, division, absolute_import, print_function)
144-store_version = 2 # Needed for dynamic plugin loading
145+store_version = 3 # Needed for dynamic plugin loading
146
147 __license__ = 'GPL 3'
148 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
149@@ -129,12 +129,12 @@
150 doc = html.fromstring(f.read().decode('latin-1', 'replace'))
151
152 data_xpath = '//div[contains(@class, "prod")]'
153- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
154+ format_xpath = './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
155 asin_xpath = '@name'
156 cover_xpath = './/img[@class="productImage"]/@src'
157 title_xpath = './/h3[@class="newaps"]/a//text()'
158 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
159- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
160+ price_xpath = './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
161
162 for data in doc.xpath(data_xpath):
163 if counter <= 0:
164
165=== modified file 'src/calibre/gui2/store/stores/amazon_uk_plugin.py'
166--- src/calibre/gui2/store/stores/amazon_uk_plugin.py 2013-02-27 10:38:38 +0000
167+++ src/calibre/gui2/store/stores/amazon_uk_plugin.py 2013-04-01 12:39:24 +0000
168@@ -1,7 +1,7 @@
169 # -*- coding: utf-8 -*-
170
171 from __future__ import (unicode_literals, division, absolute_import, print_function)
172-store_version = 1 # Needed for dynamic plugin loading
173+store_version = 2 # Needed for dynamic plugin loading
174
175 __license__ = 'GPL 3'
176 __copyright__ = '2011, John Schember <john@nachtimwald.com>'
177@@ -45,12 +45,18 @@
178 doc = html.fromstring(f.read())#.decode('latin-1', 'replace'))
179
180 data_xpath = '//div[contains(@class, "prod")]'
181- format_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()'
182+ # Results can be in a grid (table) or a column
183+ format_xpath = (
184+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
185+ '//span[contains(@class, "lrg") and not(contains(@class, "bld"))]/text()')
186 asin_xpath = '@name'
187 cover_xpath = './/img[@class="productImage"]/@src'
188 title_xpath = './/h3[@class="newaps"]/a//text()'
189 author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
190- price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
191+ # Results can be in a grid (table) or a column
192+ price_xpath = (
193+ './/ul[contains(@class, "rsltL") or contains(@class, "rsltGridList")]'
194+ '//span[contains(@class, "lrg") and contains(@class, "bld")]/text()')
195
196 for data in doc.xpath(data_xpath):
197 if counter <= 0:

Subscribers

People subscribed via source and target branches

to status/vote changes: