Skip to content

Commit 591fe0d

Browse files
authored
Merge pull request #36 from orangain/loosen-validation
Allow searching by browse_node or search_index alone
2 parents 51e1e76 + 1efd429 commit 591fe0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

amazon/paapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ def search_products(self, item_count=10, item_page=1, items_per_page=10, keyword
234234
raise AmazonException('ValueError', 'Arg item_count should be between 1 and 100')
235235
if item_page < 1:
236236
raise AmazonException('ValueError', 'Arg item_page should be 1 or higher')
237-
if not keywords and not actor and not artist and not author and not brand and not title:
237+
if not keywords and not actor and not artist and not author and not brand and not title and not browse_node and not search_index:
238238
raise AmazonException('ValueError', 'At least one of the following args must be '
239-
'provided: keywords, actor, artist, author, brand,'
240-
'title')
239+
'provided: keywords, actor, artist, author, brand, '
240+
'title, browse_node, search_index')
241241
results = []
242242
while len(results) < item_count:
243243
try:

0 commit comments

Comments
 (0)