Giter Club home page Giter Club logo

keepa's People

Contributors

999samurai avatar akaszynski avatar chocobn69 avatar dehidehidehi avatar dependabot[bot] avatar kies8 avatar lesonicdev avatar mverkruyse avatar pmaddi avatar pre-commit-ci[bot] avatar raphaelfranca avatar samamorgan avatar sverrirarnors avatar syrus avatar threemonks avatar wixihatchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keepa's Issues

module 'keepa' has no attribute 'Api'

Brief example should be showing the following:

import keepa

accesskey = 'XXXXXXXXXXXXX' # enter real access key here

api = keepa.Keepa(accesskey)

# Single ASIN query
products = api.query('B0088PUEPK') # returns list of product data

# Plot result (requires matplotlib)
keepa.plot_product(products[0])

As api = keepa.Api(accesskey) line is throwing an error saying:

module 'keepa' has no attribute 'Api'

Sample Code

Looking to use the keepa api to pull historical prices and sales rank over the last year from amazon. Any example python code you can point me to that I can lift?

historical daily sales rank data

Hi, all,
I have purchase keepa api and got its key. But I am new to python and still don't know how to get daily sales rank data per Asin?

here is my code:

import keepa
import logging
import inspect
logging.basicConfig()
import datetime
import requests
import numpy as np
accesskey = 'xxxxx'
api = keepa.Keepa(accesskey)
asins = 'B00IIFW2L4'
products = api.query(asins, offers=20, stats=90, history=0, rating=1) # I think you were missing this
product = products[0]
offers = product['offers']
categoryTree = product['categoryTree']
stats = product['stats']

print('\nASIN is:\n' + products[0]['asin'])
currentPrice = stats['current'][18]
currentRank = stats['current'][3]

print ('Current Price:\t\t\t' + str(currentPrice/100.00))
print ('Current Rank:\t\t\t' + str(currentRank))

here is the output:
ASIN is:
B00IIFW2L4
Current Price: 64.99
Current Rank: 621

But what i want is historical daily sales rank data, like:
Date(daily): sales rank price USD
10222014 1 70.00
10232014 3 69.00
… …
08252019 1 64.99

Would you please help me on it? thanks

Update Parameter Always Passed On As `None'

The function ProductQuery (on line 512 of interface.py) does not correctly handle the "update" parameter: it is always passed on as "None" through the settings dict. The mistake is on line 721 I believe.

Offer Parameter Treated Incorrectly (Even After Update)

When querying a list of products and attempting to retrieve offers, e.g. by using

api.ProductQuery(asins, offers=20, update=0)

the offers parameter is still treated as a bool eventually: while the api.ProductQuery function correctly interprets it as integer, it then passes it on to the (top-level) function ProductQuery via ThreadRequest and the function ProductQuery still checks whether offers is true (which any number above zero gets converted to) and then sets the `offers' parameter for the payload at 1000.

(Off-Topic: Thank you so much for developing this API, makes my life a hell of a lot easier. Really appreciate it!)

Some asins would return error when plotting graph

asins = ['B01I6KT07E', 'B01G5BJHVK', 'B017LJP1MO']

above asins return the following error when trying to plot graphs using the below code:

products = api.query(asins)
keepa.plot_product(products[0])

Any advice?

Error:

Traceback (most recent call last):
  File "D:/python_projects/keepa/test.py", line 29, in <module>
    keepa.plot_product(products[0])
  File "D:\python_projects\keepa\venv\lib\site-packages\keepa\plotting.py", line 114, in plot_product
    plt.show(block=True)
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\pyplot.py", line 254, in show
    return _show(*args, **kw)
  File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 25, in __call__
    manager.show(**kwargs)
  File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 107, in show
    self.canvas.show()
  File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 62, in show
    self.figure.tight_layout()
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\figure.py", line 2374, in tight_layout
    pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 366, in get_tight_layout_figure
    pad=pad, h_pad=h_pad, w_pad=w_pad)
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 115, in auto_adjust_subplotpars
    tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 116, in <listcomp>
    if ax.get_visible()])
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axes\_base.py", line 4373, in get_tightbbox
    bb_xaxis = self.xaxis.get_tightbbox(renderer)
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 1140, in get_tightbbox
    ticks_to_draw = self._update_ticks(renderer)
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 1023, in _update_ticks
    tick_tups = list(self.iter_ticks())  # iter_ticks calls the locator
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 967, in iter_ticks
    majorLocs = self.major.locator()
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1230, in __call__
    self.refresh()
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1250, in refresh
    dmin, dmax = self.viewlim_to_dt()
  File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1001, in viewlim_to_dt
    .format(vmin))


ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units

Subsetting Data Query By Date

Alex, I’ve read through your incredibly helpful documentation and have enjoyed working with the module you’ve put together, but I’ve had a lot of difficulty trying to limit the the price data to only the most recent 180 days. Is there anyway you could tell me or show how I would go about implementing that condition onto a product query so when I submit a query for asin(s) it’s only returning the last 180 days? Not the most recent 180 listings but the earliest (first) price listing for each day of a product for the last 180 days. I’d like return 180 records for each product, one price per day. Do I use the LISTPRICE key and could I combine that query with one sales rank per day as well?

It may be just my primary language and experience is with R but I was hoping you would shed some light on the matter as there is very little online information/guidance on Keepa.

Sales Rank output

Is there a way to Output the latest Sales rank for an array of ASINs
I'm new to Python, it'll really help me out if there's a hint I could use.
I'm able to find the rank in the JSON output under the product object > csv, I'm still hopinh im looking in the right direction. Any help would be appreciated.

How to Install Keepa on Python

Dear Keepa Community,

Trust you are well. I would like to ask for your help regarding how to install Keepa on Python.

I just have subscribed to Keepa to extract historical prices on Amazon; however, I am not sure where to start. Could you please guide me through the process? For your information, I am new to Python and would like to start learning it.

Best regards,
nakazas

Search products by using EAN orJAN .

I search product price in several countries to know difference in price.
And Amazon sometimes sells same products with different ASIN .
In this case I cannot get the difference by using this API .
To resolve this problem , we can search products by using EAN or JAN too.
EAN and JAN is only code for each product . So using them is good way I think .

I asked keepa help . And I was told to do feature request .
https://keepa.com/#!discuss/t/can-we-search-by-using-ean-or-jan/7395
But I could not understand where feature request was .
So if here was not for feature request , sorry for making trouble .

And Thank you so much for developing this API.
I have used three APIs. This API is most simple design to use.I appreciate your works!!

Problem at api = keepa.Api(accesskey)

Hi,

Thanks for making the software available. Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Windows 10 32bit
on a HyperV virtual machine

Same error on my Windows 10 64bit machine

I install the module using “pip install keepa”
Running this code in sublime3:

import keepa
accesskey = ‘6999999999999999999999999’
api = keepa.Keepa(accesskey)
products = api.query(‘B0088PUEPK’) # returns list of product data #B07D3DTW4G

I get: AttributeError: module ‘keepa’ has no attribute ‘Keepa’

i also tried the same code with the following in place of api = keepa.Keepa(accesskey)

api = keepa.Api(accesskey)

Same error.

Any help would be appreciated.

Thanks

Time conversion

How to convert keepa time into a timestamp,I don't know the rules.. like 3574824 -> 1508358211007

BestSelllersQuery

Hi,

BestSellersQuery, won't return anything.
It says "Best sellers search results not yet available" for valid categories I query

Is this keepa related or python API related

Thread error

Lately I have been encountering an error when running the API more frequently than I used to. This error seems to be related with the multiple threads part of the API.

Please see below/attached a screenshot of the error:

untitled

I used to get this error every now and then. But now it seems to be more persistent. I have tried to to add the option nthreads=1 but to no avail. I am not sure whether the problem is with my Python installation or with the API itself. I am using Python 3.5.2 :: Anaconda 4.2.0 (64-bit).

I am using the API version keepaAPI-0.12-py3.5. I have tried to update to the newer one, but a similar error occurs with the same frequency and I found the newer API to give less info about the queries (i.e. no output on how many Asins were completed).

Thanks for the great work on the API Alex.

Python 3's f-Strings compatibility issue with python 2

It looks like you introduced some python 3 specific f-strings, which make the code no longer works for python 2? In interface.py you have:

raise RuntimeError(f'Invalid key "{key}"')

Would it be possible that you keep it backwards compatible with python 2?

Thanks

page and perPage in product_parms for product_finder?

It appears that parameter page and perPage is left out of for product_parms in product_finter, thus one can only retrieve 50 results in product_finder, unable to page through to get remaining result. Can it be added into PRODUCT_REQUEST_KEYS?

Thanks

csv field

Hi,

the returned dictionary doesn't have the csv field, can this be added?
Also data dictionary is missing tradein data and condition data.

Can these functionalities be added?

Error with keepaAPI

Hi,
After I run this in python 3.5.2. There is an error comes out.
How could I solve this?

from keepaAPI import Interface
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = Interface.API(accesskey)

#Single ASIN query
products = api.ProductQuery('059035342X') # returns list of product

ERROR:

INFO : Connecting to keepa using key XXXXXXXXXXXXXXXX
Traceback (most recent call last):
File "test.py", line 3, in
api = Interface.API(accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 348, in init
self.user = UserStatus(self.accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 102, in init
self.UpdateFromServer()
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 107, in UpdateFromServer
self.status = GetUserStatus(self.accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 91, in GetUserStatus
raise Exception(scodes[str(status_code)])
Exception: REQUEST_REJECTED

retrying when NOT_ENOUGH_TOKEN and asin list become empty

When I submit a product query with offers=20, to obtain new_fba price etc, it might come back with NOT_ENOUGH_TOKEN exception, but I noticed a few issues with the exception handling and retry. Here is API call with offers=20 to retrieve new_fba price (I passed 20 asins into the API call):

ProductQuery(asins, offers=20, history=True)

Here is the log:
Exception2018-09-15 20:46:47,664 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception NOT_ENOUGH_TOKEN in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 255, in ProductQuery raise Exception(scodes[str(status_code)]) Exception: NOT_ENOUGH_TOKEN : Error in thread 2018-09-15 20:46:48,059 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception NOT_ENOUGH_TOKEN in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 255, in ProductQuery raise Exception(scodes[str(status_code)]) Exception: NOT_ENOUGH_TOKEN 2018-09-15 20:47:47,244 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception 'products' in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 247, in ProductQuery for product in response['products']: KeyError: 'products' 2018-09-15 20:47:47,663 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception 'products' in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 247, in ProductQuery for product in response['products']: KeyError: 'products' 2018-09-15 20:47:47,678 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:65} - ERROR - Request for asins [] failed

  1. should the code test for key 'products' to avoid the KeyError exception above because it is legitimate case to have no 'products' when exception occurs
  2. Can you make the hard-coded max_retry a parameter that can be specified via the API call, and will also be very helpful to make the retry interval be exponentially increasing
  3. In the above exception code, why is the asins list empty? There would be no need to call the API if asins list is empty. I stepped through the code, it appears that the code does not consider the fact that self.user.RemainingTokens() could be negative when calculating nrequest. Can this be considered?

Thanks

ProductQuery more tokens spent than asins

Hi Alex,

For the past couple of days I have been puzzeld by the time some pulls take. I realized that whenever I ask the code to pull a large number of asins (usually > 200) it always takes more tokens than the number of asins. The relation is not clear, sometimes it takes more than double, sometimes less than double.

I can't debug whether the issue comes from the API or there is a problem with the Keepa database.

Not sure if you have the chance to look into that.

edit: if you need a Keepa login to test it I can lend you mine.

Async keepa

Hello,

Few months ago, I had to use keepa in an async loop.
So I forked this project to transform keepa lib into asynckeepa.

I'm wondering how I could merge my work into your project back.

You can check what I did here : https://github.com/alexandriagroup/asynckeepa

It's working very well

categories_include in product finder

Hi,

It seems that categories_include and categories_exclude are missing from PRODUCT_REQUEST_KEYS so cannot be included in product_finder commands.

Example:
import keepa
api = keepa.Keepa(accesskey)
product_parms = {'categories_include': ["1055398"]}
products = api.product_finder(product_parms)

File "C:\ProgramData\Anaconda3\lib\site-packages\keepa\interface.py", line 1869, in product_finder
raise RuntimeError('Invalid key "%s"')

I'm guessing this is because 'categories_include' and 'categories_exclude' are missing from product_finder_keys.py, even though they are included in the documentation. Would be great if this could be added. Thanks a lot (and sorry if I missed something - I'm new to Keepa and your program)!

how to read the stats object?

Hello,

The 'stats' JSON object come out as printed below and I am not sure how to make sense of it. How could I get the 90-day lowest price or 90-day average price from the data below? Thank you!

{'current': [476, 232, 7989, 5966, 604, -1, -1, 603, -1, -1, 940, 15, 1, -1, -1, 17, 45, 317, 476, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg': [494, 232, 7771, 13718, 628, -1, -1, 606, -1, 228, 939, 16, 1, -1, -1, -1, 45, 311, 477, 7459, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg30': [476, 232, 7989, 10641, 604, -1, -1, 609, -1, -1, 939, 15, 1, -1, -1, -1, 45, 313, 476, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg90': [494, 232, 7771, 13721, 628, -1, -1, 606, -1, 228, 939, 16, 1, -1, -1, -1, 45, 311, 477, 7459, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg180': [477, 232, 7880, 13910, 568, -1, -1, 594, -1, 228, 735, 17, 1, -1, -1, -1, 45, 307, 465, 7660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'atIntervalStart': [381, 232, 7989, 20782, 493, -1, -1, 595, -1, -1, -1, 17, 1, -1, -1, 18, 45, 310, 381, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'min': [[2245860, 297], [1360680, 82], [3574296, 205], [3130848, 294], [3213538, 297], None, None, [3814028, 441], None, [3527188, 217], [3907932, 400], [3578960, 8], [2944384, 1], None, None, None, [3186826, 45], [3186826, 166], [3227960, 297], [3527188, 217], None, [3227960, 49766], None, None, None, None, None, None, None, None, None, None], 'max': [[4092488, 993], [3540668, 674], [2998914, 94063], [3552686, 37426], [4090582, 993], None, None, [3541902, 788], None, [4083480, 229], [3522240, 1204], [2857422, 30], [4080544, 3], None, None, None, [3224412, 46], [4170676, 317], [4093832, 993], [3647764, 8097], None, [3239770, 58223], None, None, None, None, None, None, None, None, None, None], 'minInInterval': [[4043282, 381], [4043282, 232], [4080544, 216], [4172384, 5415], [4043282, 493], None, None, [4043282, 595], None, [4083480, 229], [4135266, 940], [4102254, 14], [4043282, 1], None, None, None, [4043282, 45], [4116050, 307], [4043282, 381], [4083480, 229], None, [-1, -1], None, None, None, None, None, None, None, None, None, None], 'maxInInterval': [[4092488, 993], [4109716, 427], [4043282, 7989], [4110024, 28882], [4090582, 993], None, None, [4140580, 633], None, [4083480, 229], [4135266, 940], [4049780, 19], [4080544, 3], None, None, None, [4043282, 45], [4170676, 317], [4093832, 993], [4043282, 8087], None, [-1, -1], None, None, None, None, None, None, None, None, None, None], 'outOfStockPercentageInInterval': [0, 0, 0, -1, 0, -1, -1, 0, -1, 93, 71, -1, -1, -1, -1, -1, -1, -1, 8, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'outOfStockPercentage90': [0, 0, 0, -1, 0, -1, -1, 0, -1, 93, 71, -1, -1, -1, -1, -1, -1, -1, 8, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'outOfStockPercentage30': [0, 0, 0, -1, 0, -1, -1, 0, -1, 100, 13, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'stockPerCondition3rdFBA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'stockPerConditionFBM': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'stockAmazon': -2, 'stockBuyBox': -2, 'retrievedOfferCount': -2, 'totalOfferCount': 16, 'tradeInPrice': -1, 'buyBoxPrice': 476, 'buyBoxShipping': 0, 'lastOffersUpdate': 4172642, 'buyBoxIsUnqualified': False, 'buyBoxIsShippable': True, 'buyBoxIsPreorder': False, 'buyBoxIsFBA': True, 'buyBoxIsAmazon': True, 'buyBoxIsMAP': False, 'buyBoxIsUsed': False, 'isAddonItem': False, 'lightningDealInfo': None, 'sellerIdsLowestFBA': None, 'sellerIdsLowestFBM': ['A2FVWI1N0THHUF'], 'offerCountFBA': 0, 'offerCountFBM': 15}

How to Extract Latest 365 days of Amazon Product Price

Dear Alex,

Thank you very much for your helpful guidance to install the module. I was able to follow it. Now, I would like to extract the most recent 365 days for a certain product. I was able to extract the first 10 days or first XX days of price information, but not the most recent ones. Would you be able to help me out with this, please?

Best regards,
nakazas

Change Line 83 in Interface.py

Currently line 83 refers to logging.err('Request failed')

Logging module has no err function, changing it to logging.error('Request failed') fixes this.

I don't know how to submit a pull request otherwise I'd help out.

Keepa Sales rank data error

Dear all,

I have purchased Keepa API and pulled sales rank data via several Asins, However, I found lots of product sales rank data is far ahead of product lauch date( from Amazon site) and review generating date( from Amazon).
Does anyone notice it and can help me figure it out?

for example: for Asin B01GW8YDLK, product Marvel’s Spider Man, Firs release date is September 7, 2018; and First review September 6, 2018 btu the sales rank data starting from 2016-06-14:

Date Salesrank
2016-06-14 -1
2016-06-14 48
2016-06-14 33
2016-06-15 48
2016-06-15 63
2016-06-16 65
2016-06-16 62
2016-06-16 61
2016-06-16 64
2016-06-17 66
2016-06-17 69
...

the same issue happened to B01GW8XOY2, B07DJY81FP etc..

I am think is it preorder? but it is video game product and I am dounting about the preorder could start even 2 years or half years ago?

Wait for your feedback and thank you very much.

Stats - Csv

Hi again,
thanks for the previous fixes. I noticed couple other things, and I was wondering if they could be fixed as well:

  1. I don't think the stats field working properly ;
    for a product the returned avg30 :
    'avg30': [18217, 12882, 3548, 39440, 23995, 7027, -1, 16848, -1, -1, -1, 13, 77, -1, 0, -20, 35, 31, 13140, 11494, 7916, 7045, 4016, -1, -1, 7427, -1, -1, -1, -1, 2226],

  2. What's in the csv field? I was expecting to see something like what's described here -https://keepa.com/#!discuss/t/product-object/116

Can these be fixed?

Thank you very much for the effort, this python API is extremely useful =)

deals ?

how we can perform a deal request ?

Module 'keepaAPI' has no 'API' member

Hello,
I've tried executing the brief example. I've tried it on two different machines, 3 different IDEs, with Python 32bit, Anaconda 32bit and 64bit and I always get the same error:
Module 'keepaAPI' has no 'API' member

Any advice?

Thanks!

Same ASIN for one product on different amazon sites

Hi there,

I have one ASIN ID - B00238TG6Q its the ASIN ID of a mattress which is sold in 4 amazon sites of different counntries (DE, ES, UK, PT) with same asin id. So its difficult to find the price change of the product in one site (ES) as the code gets confused which one to choose,

numpy array issue

I am having issues using the 'data' from the product object dict.
I am new to numpy, so I don't even know where to start looking for information. :(

Can you tell me how I can convert the numpy arrays into something I can use? I would love to be able to use the data as a pandas DataFrame, or even a list but it's coming across as a string & I know that there's a better option than building a parser to make it into a list.

Thanks!

salesrank data error?

Dear all,

I am using keepa API to pull out the sales rank data from keepa. one product sales rank seems wrong.
for example, product( Asin: B00UG9HB1Q) was sold in Amazin since 2018 and the sales rank data start from 2015.
amazon link: https://www.amazon.com/AmazonBasics-Security-Safe-Cubic-Feet/dp/B00UG9HB1Q/ref=cm_cr_arp_d_product_top?ie=UTF8
my code and output:
salesrankcode

the sales rank data chart from https://www.profitguru.com/products, which is match with Amazon
guru

anyone can help me on it? thanks.

Shipping prices not adding in to 'new' price properly

I encountered an asin (B00NPAJ8L4) where the lowest price is not the buy box price. I believe, as a result, I am not getting the shipping of the lowest priced item added in correctly. Elaborating on the asin above:

B00NPAJ8L4, as of time of posting:

  • Buy Box: 327.00 + 0 Shipping
  • Lowest Price (amazon 3rd party seller): 305 + 15.99 Shipping
  • ['data']['NEW'][num_items-1]: 305

I noticed in the notes of the last release the following line:
"Shipping prices, which previously messed up the data from a product, are now added directly into the price."
This seems to suggest that in cases that lowest isn't buy box that this could occur, but please let me know if it is something I just have missed.

brand is one of filtering

keepa api filters brand/label/manufacturer/publisher/studio using "is one of", so the value for that filtering is a list, not a str. Seem like the code is casting that list into a string, thus returns no result usually. This is also true for all other text fields searching in keepa api, including but not limited to model, size, etc.

Error in establishing authentication with keepa API

Simply trying to connect with:

from keepaAPI import Interface
import matplotlib.pyplot as plt

accesskey = 'XXX' # enter real access key here
api = Interface.API(accesskey)

I receive the error:

Traceback (most recent call last):
  File "keepa_scrape.py", line 7, in <module>
    api = Interface.API(accesskey)
  File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 349, in __init__
    self.user = UserStatus(self.accesskey)
  File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 103, in __init__
    self.UpdateFromServer()
  File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 108, in UpdateFromServer
    self.status = GetUserStatus(self.accesskey)
  File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 87, in GetUserStatus
    del response['n']
KeyError: 'n'

I am working of mac El-capitan, python 2.7.10 with the installs:
Successfully installed keepaAPI-0.10.1 numpy-1.8.0rc1 requests-2.11.1 six-1.4.1

update Same error in ubuntu 16.04

Add product finder

Hello. Keepa recently added access to the product finder feature to the Java-based API. Has anyone already added this to Python? Any plans to add it to this repository?

Thanks, this is a great project.

Discovery of new asin

Hello, one question puzzled me about how keepa knew the new asin and began to track it. The request is for me. Thank you.

csv feed alignment

I am seeing csv field value that does not seem to align with the definition defined on keepa API documentation at

For example, for ASIN B00M0QVOOS, here is my code and output:

>>> api = keepaAPI.API(KEEPA_ACCESSKEY)
>>> products = api.ProductQuery('B00M0QVOOS')
>>> products[0]['csv'][11]
[2284199, 9, 2290895, 8, 2292208, 9, 2292988, 8, 2294708, 7, 2295734, 8, 2302437, 9, 2305939, 8, 2311395, 9, 2328132, 10, 2332527, 9, 2336300, 10, 2337449, 8, 2344275, ...

According to keepa API documentation, csv field 11 (index starts at 0) should be COUNT_NEW. A value of 2284199 does not seem to be a valid offer count for NEW condition.

Thanks

amazon price and number of sellers -0.01

It appears that in version 0.14.2, some amazon price and number of sellers are returned as -0.01, whereas in later version 0.15.0 or 0.15.8, these values are turned into nan? The value -0.01 actually does mean Amazon is out of stock, the the item is completely out of stock, vs nan usually means missing value. Can these values be preserved as it is? I believe the issue is with the following code inside ParseCSV

            if isfloat:  # Convert to float price if applicable
                nanmask = values < 0
                values = values.astype(np.float)/100
                values[nanmask] = np.nan

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.