Skip to content

Commit 048792e

Browse files
Merge PR #747: Fix Amazon search and resolve CI conflicts
2 parents c54ed5e + 1b9f35d commit 048792e

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Copyright (C) 2024-2025 Calibre-Web Automated contributors
303303
- zhiyue (1 commits)
304304
# Fork Contributors (crocodilestick/calibre-web-automated)
305305

306-
- crocodilestick (764 commits)
306+
- crocodilestick (762 commits)
307307
- jmarmstrong1207 (73 commits)
308308
- demitrix (30 commits)
309309
- sirwolfgang (22 commits)

cps/metadata_provider/amazon.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def inner(link, index) -> [dict, int]:
112112
except (AttributeError, ValueError, TypeError):
113113
match.rating = 0
114114
try:
115-
asin = soup2.find("input", attrs={"type": "hidden", "name": "asin"})["value"]
115+
asin = soup2.find("input", attrs={"type": "hidden", "name": lambda x: x and x.lower()=="asin"})["value"]
116116
match.identifiers = {"amazon": asin, "mobi-asin": asin}
117117
except (AttributeError, TypeError):
118118
match.identifiers = {}
@@ -163,9 +163,10 @@ def inner(link, index) -> [dict, int]:
163163
if self.active:
164164
q = {
165165
'unfiltered': '1',
166-
's': 'relevanceexprank',
166+
'sort': 'relevanceexprank',
167+
'search-alias': 'stripbooks',
167168
'i': 'digital-text',
168-
'k': query,
169+
'field-keywords': query,
169170
}
170171

171172
try:

0 commit comments

Comments
 (0)