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:
[source,bash]
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-0.1.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-0.1.0.tar.gz.
File metadata
- Download URL: keepa_crawler-0.1.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 |
9a97eff703f45f3749087e5ce0e0cab360cc6871618b7d7d7dadd31a77af2e09
|
|
| MD5 |
8c1e97c5194b267dd3f03afc265fd9c3
|
|
| BLAKE2b-256 |
c8790c2ef256138dd6e3aa4afb0a76d4a4cbcbd2b4975a2fcecff697927de71d
|
File details
Details for the file keepa_crawler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: keepa_crawler-0.1.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 |
5b9beb2e97a5a9cbecb2e4290a84852f001a284cc976ba122c82618510118ac7
|
|
| MD5 |
b7ef03987f39d93e78b7130562d95185
|
|
| BLAKE2b-256 |
25e17ef3549332c725196f0e91e01182f25c55beb4c1ce172ae3ae7fd5e50e35
|