keepa icon indicating copy to clipboard operation
keepa copied to clipboard

only_live_offers = True doesn't work in api.query

Open brahmac opened this issue 2 years ago • 1 comments

Query products = api.query('B0024SIHAG', domain = 'CA', offers=20, only_live_offers=True, update = 24, history=False, progress_bar=True)

Error TypeError: query() got an unexpected keyword argument 'only_live_offers'

Issue The parameter 'only_live_offers' doesn't seem to work in the product request query.

Log

TypeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_12916/2185064537.py in 13 14 s_time = time.time() ---> 15 products = api.query('B0024SIHAG', domain = 'CA', offers=20, only_live_offers=True, update = 24, history=False, progress_bar=True) 16 e_time = time.time() 17 len(products)

~\Anaconda3\lib\site-packages\keepa\interface.py in magic_method(*args, **kwargs) 2156 if hasattr(self.parent, attr) and callable(getattr(self.parent, attr)): 2157 if asyncio.iscoroutinefunction(getattr(self.parent, attr)): -> 2158 return run_and_get(getattr(self.parent, attr)(*args, **kwargs)) 2159 else: 2160 return getattr(self.parent, attr)(*args, **kwargs)

TypeError: query() got an unexpected keyword argument 'only_live_offers'

brahmac avatar May 06 '22 23:05 brahmac

I have ran your code and it works on my end.

singleAsin = keepaApi.query('B0024SIHAG', domain = 'CA', offers=20, only_live_offers=True, update = 24, history=False, progress_bar=True)

Returning

[{'csv': None, 'categories': None, 'imagesCSV': None, 'manufacturer': None, 'title': None, 'lastUpdate': 6016384, 'lastPriceChange': 5997414, 'rootCategory': 0, 'productType': 4, 'parentAsin': None, 'variationCSV': None, 'asin': 'B0024SIHAG', 'domainId': 6, 'type': None, 'hasReviews': False, 'trackingSince': 5997414, 'brand': None, 'productGroup': None, 'partNumber': None, 'model': None, 'color': None, 'size': None, 'edition': None, 'format': None, 'packageHeight': -1, 'packageLength': -1, 'packageWidth': -1, 'packageWeight': -1, 'packageQuantity': -1, 'isAdultProduct': False, 'isEligibleForTradeIn': False, 'isEligibleForSuperSaverShipping': False, 'offers': None, 'buyBoxSellerIdHistory': ['5997414', '-2'], 'isRedirectASIN': False, 'isSNS': False, 'author': None, 'binding': None, 'numberOfItems': -1, 'numberOfPages': -1, 'publicationDate': -1, 'releaseDate': -1, 'languages': None, 'lastRatingUpdate': -1, 'ebayListingIds': None, 'lastEbayUpdate': 0, 'eanList': None, 'upcList': None, 'liveOffersOrder': None, 'frequentlyBoughtTogether': None, 'features': None, 'description': None, 'promotions': None, 'newPriceIsMAP': False, 'coupon': None, 'availabilityAmazon': -1, 'listedSince': 0, 'fbaFees': None, 'variations': None, 'itemHeight': -1, 'itemLength': -1, 'itemWidth': -1, 'itemWeight': -1, 'salesRankReference': -1, 'salesRanks': None, 'salesRankReferenceHistory': None, 'launchpad': False, 'isB2B': False, 'stats': None, 'offersSuccessful': False, 'g': 2711, 'categoryTree': None}]

Process finished with exit code 0

gduong44 avatar Jun 11 '22 22:06 gduong44