This is a simple scraper for obtaining the prices of goods in Croatian supermarkets. Inspired by this post.
Supported sites
See shop_scraper_hr/scrapers for a list of supported scrapers.
Installation
Release version
pip install shop-scraper-hr
Dev version
Clone the repo:
git clone git@github.com:JCGoran/shop-scraper-hr.git
The project uses Python Poetry for dependency management, and all dependencies can be installed using:
poetry install
Usage
>>> # for getting data from Konzum
>>> from shop_scraper_hr.scrapers import konzum
>>> # get a list of all categories
>>> categories = konzum.get_category_urls()
>>> # get a list of prices from a category
>>> prices = konzum.get_prices(categories[0])
>>> prices
[
{ 'currency_per_unit_quantity': '€/kom',
'price_data': { 'amount': '1,72',
'currency': '€',
'quantity_unit': 'kom'},
'price_fractional_part': 72,
'price_integer_part': 1,
'title': 'F5 Auto spužva jumbo',
'url': 'https://www.konzum.hr/web/products/f5-auto-spuzva-jumbo'},
{ 'currency_per_unit_quantity': '€/kom',
'price_data': { 'amount': '5,31',
'currency': '€',
'quantity_unit': 'kom'},
'price_fractional_part': 31,
'price_integer_part': 5,
'title': 'Armor All Vlažne maramice za staklo 20/1',
'url': 'https://www.konzum.hr/web/products/maramice-vlazne-20-1'},
...
]
Metadata
Release files for shop-scraper-hr 0.1.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 |
|---|---|---|---|---|
| shop_scraper_hr-0.1.1.tar.gz | 4.2 kB | Without provenance | Details for shop_scraper_hr-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shop_scraper_hr-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for shop_scraper_hr-0.1.1-py3-none-any.whl |
Total release size: 10.4 kB
Release files / shop_scraper_hr-0.1.1.tar.gz
| Download URL | shop_scraper_hr-0.1.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f8c564928744d97d8bf4d060fcdf09ce5edc0bcb3c0af08300d2727f6429c20
|
|
BLAKE2b-256 checksum How to use checksums |
4f78bc741ae3efc747c88b140bc94de9405c19e6815ab0a2ce0c03169582ee20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.5 Linux/6.1.0-9-amd64
|
Release files / shop_scraper_hr-0.1.1-py3-none-any.whl
| Download URL | shop_scraper_hr-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
265093a0c44d1e2efd351d49b20ce1051dd00564520659b94680d7fa33c7b759
|
|
BLAKE2b-256 checksum How to use checksums |
2e4fb1c4a4d394366764c33326a0ebcd3ae5a2082849f0e7b24d7e6c94ff7436
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.5 Linux/6.1.0-9-amd64
|
Security for shop-scraper-hr 0.1.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.