A client to crawl Keepa's historical Amazon product data
Project description
keepa_crawler
A Python client for interacting with Keepa's WebSocket API to retrieve historical Amazon product data.
Installation
Install from PyPI:
pip install keepa_crawler
Usage
from keepa_crawler import KeepaClient
# Initialize the client
client = KeepaClient()
# Example 1: Retrieve historical prices for a specific ASIN
try:
data = client.get_historical_prices(asin="B08N5WRWNW")
print("Historical Prices:", data)
except Exception as e:
print(f"Error retrieving data: {e}")
# Example 2: Handling multiple ASINs
asins = ["B08N5WRWNW", "B07XJ8C8F5", "B09FGT1JQC"]
for asin in asins:
try:
data = client.get_historical_prices(asin=asin)
print(f"Data for {asin}: {data}")
except Exception as e:
print(f"Error retrieving data for {asin}: {e}")
# Example 3: Handling a timeout error
try:
data = client.get_historical_prices(asin="B08N5WRWNW", timeout=5)
print("Historical Prices:", data)
except Exception as e:
print(f"Timeout or other error occurred: {e}")
# Clean up the client
client.close()
Requirements
- Python 3.8 or newer
- Dependencies are installed automatically via
pip
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
keepa_crawler-1.0.0.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keepa_crawler-1.0.0.tar.gz.
File metadata
- Download URL: keepa_crawler-1.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01af04c527687f4cf15151fa817a1f5ea7c588624f9969ddec511202b7cd5b6a
|
|
| MD5 |
76b829fed7415f9a53d84513a26de880
|
|
| BLAKE2b-256 |
d3b30a0e621b65f7167aa640875c567994ed844d2c61dbe75445eb141ccfce1f
|
File details
Details for the file keepa_crawler-1.0.0-py3-none-any.whl.
File metadata
- Download URL: keepa_crawler-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2819a937d8161266483b2ba70d34ff48a2ed39d21629f0c3fbc5b4b9d53fbdf7
|
|
| MD5 |
ec8c076d26642b6e55c85adb423cb25e
|
|
| BLAKE2b-256 |
68fe52ba984f89bcc492d54b5afbfcf46218eb7bf31d19e83c236a69f9f0de9a
|