Skip to main content

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)

Source distribution for shop-scraper-hr 0.1.1
File Size Uploaded
shop_scraper_hr-0.1.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shop-scraper-hr 0.1.1
File Interpreter ABI Platform
shop_scraper_hr-0.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page