sergioteula / python-amazon-paapi

Amazon Product Advertising API 5.0 wrapper for Python 💰
MIT License
228 stars 46 forks source link

Search Items without mandatory args #85

Closed DanielBakovic closed 2 years ago

DanielBakovic commented 2 years ago

Hi.

I'm wondering why search_items is not working without parameters like: keywords, actor, artist, author, brand or title. I can use Amazon PAAPI Scratchpad without those parameters. In my opinion, those parameters should be optional.

By commenting out _check_search_mandatory_args(**kwargs) the API works for my needs.

Best regards, Daniel

sergioteula commented 2 years ago

Hello Daniel. You need to pass at least one search item for the API to return something. What are you passing? Thanks!

DanielBakovic commented 2 years ago

Hello Sergio,

Thx for your response. I'm using the API to grab discounted products by browesenode ID:

search_results = amazon.search_items(item_count=10, item_page=page,browse_node_id=browsenode, min_saving_percent=settings.savings_threshold)

This works only if I comment out the parameter check.

sergioteula commented 2 years ago

This is solved and a new version is available: https://github.com/sergioteula/python-amazon-paapi/releases/tag/v4.2.1