akaszynski / keepa

Python Keepa.com API
https://keepaapi.readthedocs.io/en/latest/
Apache License 2.0
241 stars 77 forks source link

Browsing deals (api.deals) not work with deals_parms? #123

Closed JohnDoe15152 closed 1 year ago

JohnDoe15152 commented 1 year ago

Hello Im new with keepa api . Since few weeks, i don't make a correct request with browsing deal (api.deals). It seems deals_params not work on request. When i put same params in keepa web page, asins are not the same with asins present on keepa webpage. Anyone have an idea why is not correct? Sorry for my poor english, thanks you!

JohnDoe15152 commented 1 year ago

Here is my code with link associated:

import keepa api = keepa.Keepa('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')

deal_parms = { "page": 0, "domainId": 4, "excludeCategories": [], "includeCategories": [], "priceTypes": [18], "deltaRange": [0, 2147483647], "deltaPercentRange": [70, 2147483647], "salesRankRange": [-1,-1], "currentRange": [0, 2147483647], "minRating": -1, "isLowest": False, "isLowestOffer": False, "isOutOfStock": False, "titleSearch": "", "isRangeEnabled": True, "isFilterEnabled": True, "filterErotic": False,

"singleVariation": True,

"hasReviews": False,
# "isPrimeExclusive": False,
# "mustHaveAmazonOffer": False,
# "mustNotHaveAmazonOffer": False,
"sortType": 1,
"dateRange": 0,
# "warehouseConditions": [2,3,4,5]
# "hasAmazonOffer": True,
# "isHighest": False,
# "isRisers": False,
# "domainId12643250011": "1",
# "domainId11044456": "1",
"deltaLastRange": []}

products_out = api.deals(deal_parms, domain='FR') print(products_out[:170])

https://keepa.com/#!deals/%7B%22page%22%3A0%2C%22domainId%22%3A%224%22%2C%22excludeCategories%22%3A%5B%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B13712257031%2C9223372036854776000%2C1661666031%2C976451031%2C976416031%2C2454181031%2C5866078031%2C976460031%2C3704982031%2C976445031%2C3677697031%2C1951048031%2C976389031%2C4772060031%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%5D%2C%22includeCategories%22%3A%5B%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%5D%2C%22priceTypes%22%3A%5B18%5D%2C%22deltaRange%22%3A%5B0%2C2147483647%5D%2C%22deltaPercentRange%22%3A%5B80%2C2147483647%5D%2C%22salesRankRange%22%3A%5B-1%2C-1%5D%2C%22currentRange%22%3A%5B0%2C2147483647%5D%2C%22minRating%22%3A-1%2C%22isLowest%22%3Afalse%2C%22isLowestOffer%22%3Afalse%2C%22isOutOfStock%22%3Afalse%2C%22titleSearch%22%3A%22%22%2C%22isRangeEnabled%22%3Atrue%2C%22isFilterEnabled%22%3Atrue%2C%22filterErotic%22%3Afalse%2C%22singleVariation%22%3Afalse%2C%22hasReviews%22%3Afalse%2C%22isPrimeExclusive%22%3Afalse%2C%22mustHaveAmazonOffer%22%3Afalse%2C%22mustNotHaveAmazonOffer%22%3Afalse%2C%22sortType%22%3A1%2C%22dateRange%22%3A%220%22%2C%22warehouseConditions%22%3A%5B2%2C3%2C4%2C5%5D%2C%22settings%22%3A%7B%22viewTyp%22%3A0%7D%2C%22perPage%22%3A150%2C%22hasAmazonOffer%22%3Atrue%2C%22isHighest%22%3Afalse%2C%22isRisers%22%3Afalse%2C%22domainId12643250011%22%3A%221%22%2C%22domainId11044456%22%3A%221%22%2C%22deltaLastRange%22%3A%5B%5D%7D

With request api.deals, i obtain this five asins: ['B09FLZVLT1', 'B08RS2DTFR', 'B0B57QLYBT', 'B0933CJ9K9', 'B09DKPZWW2'] But on webpages, its not these five first asins

akaszynski commented 1 year ago

Identified the issue and it will be fixed in #122 and included in the next release.