Scraper for prices of goods in Croatian supermarkets
Project description
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'},
...
]
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
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 shop_scraper_hr-0.1.1.tar.gz.
File metadata
- Download URL: shop_scraper_hr-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.5 Linux/6.1.0-9-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f8c564928744d97d8bf4d060fcdf09ce5edc0bcb3c0af08300d2727f6429c20
|
|
| MD5 |
b66afd0bec694b225b05187881ec4deb
|
|
| BLAKE2b-256 |
4f78bc741ae3efc747c88b140bc94de9405c19e6815ab0a2ce0c03169582ee20
|
File details
Details for the file shop_scraper_hr-0.1.1-py3-none-any.whl.
File metadata
- Download URL: shop_scraper_hr-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.5 Linux/6.1.0-9-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
265093a0c44d1e2efd351d49b20ce1051dd00564520659b94680d7fa33c7b759
|
|
| MD5 |
fb3cba2046c26a17d8a72c21151452d1
|
|
| BLAKE2b-256 |
2e4fb1c4a4d394366764c33326a0ebcd3ae5a2082849f0e7b24d7e6c94ff7436
|