SupermarketConnector
Collecting product information from Dutch supermarkets: Albert Heijn and Jumbo
Getting Started
Install the Pip package
pip install supermarktconnector
Sample
Import the jumbo connector and search for a product
from supermarktconnector.jumbo import JumboConnector
connector = JumboConnector()
connector.search_products(query='Smint', size=1, page=0)
{
"products": {
"data": [
{
"id": "70942PAK",
"title": "Smint Peppermint Sugarfree 100 Stuks 2 x 35g",
"quantityOptions": [
{
"defaultAmount": 1,
"minimumAmount": 1,
"amountStep": 1,
"unit": "pieces",
"maximumAmount": 99
}
],
"prices": {
"price": {
"currency": "EUR",
"amount": 365
},
"unitPrice": {
"unit": "kg",
"price": {
"currency": "EUR",
"amount": 5214
}
}
},
"available": true,
"productType": "Product",
"quantity": "2 x 35 g",
"imageInfo": {
"primaryView": [
{
"url": "https://ish-images-static.prod.cloud.jumbo.com/product_images/240420200540_70942PAK-1_360x360.png",
"height": 360,
"width": 360
}
]
}
}
]
}
}
You can also get the different product-categories:
from supermarktconnector.ah import AHConnector
connector = AHConnector()
connector.get_categories()
[
{
"id": 6401,
"name": "Aardappel, groente, fruit",
"images": [
{
"height": 400,
"width": 600,
"url": "https://static.ahold.com//cmgtcontent/media//002304400/000/002304468_001_groenten-fruit.png"
}
],
"nix18": false
}
]
Deprecated
X-Digest (Albert Heijn)
The Albert Heijn used a special X-Digest for verifying that the app data traffic was coming from the backend, in the new versions this has been removed.
This X-Digest is an hashed value that uses SHA1 to check if the request is valid and made by the original android app. The logic behind this hash is:
X_DIGEST = URL + PARAMETERS + USERNAME + POST_BODY (Max 1000 bytes) + SECRET_PASSWORD
Price differences (Jumbo)
In the past all the the jumbo stores where divided over 5 different categories, with each category a different price for some of the products. The token used for store identification is no longer working in the new versions, It might be handled on the backend.
I created an interactive map which sorts all the stores by category.
Metadata
Release files for supermarktconnector 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| supermarktconnector-0.8.1.tar.gz | 7.4 kB | Without provenance | Details for supermarktconnector-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| supermarktconnector-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for supermarktconnector-0.8.1-py3-none-any.whl |
Total release size: 14.7 kB
Release files / supermarktconnector-0.8.1.tar.gz
| Download URL | supermarktconnector-0.8.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69ed9297eac80c1b55aaaf6bc18ac1859daf59bc10bbd38a285d99287522a62d
|
|
BLAKE2b-256 checksum How to use checksums |
faf53b0ddb59317d93762c9c767f4f3b841e0cf957d8c854bcdbfe1ccc3950be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.8.3 requests/2.28.1 setuptools/56.0.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.8.10
|
Release files / supermarktconnector-0.8.1-py3-none-any.whl
| Download URL | supermarktconnector-0.8.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f520b9fdef923daab2972775d434d32b28f7ac4ffd1d3a2e3a6d884294949b37
|
|
BLAKE2b-256 checksum How to use checksums |
ffb535c6cd9ca6fc93090761ed138f1ce6f5b5d1e0a923c402ae38ddbaf73d50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.8.3 requests/2.28.1 setuptools/56.0.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.8.10
|
Security for supermarktconnector 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.