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 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
shop_scraper_hr-0.1.0.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file shop_scraper_hr-0.1.0.tar.gz
.
File metadata
- Download URL: shop_scraper_hr-0.1.0.tar.gz
- Upload date:
- Size: 4.1 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 | 99a6ff389efa936d4dda477a3ac2a74edad15eb43b648d78f0cd06c7ace258cf |
|
MD5 | b918c73c324c9dd717fe9e0876895137 |
|
BLAKE2b-256 | 1c55ee27cd722a699c7f09ca21e7ea569b00701563a9557e756e2784cf07a602 |
File details
Details for the file shop_scraper_hr-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: shop_scraper_hr-0.1.0-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 | 37ead8c2f786942905bb5ad215a8141097606e9a4f9ddc9c97ea542361196ba1 |
|
MD5 | 09a3ff1f2ec12d670f31f56a6a1e76dc |
|
BLAKE2b-256 | 29f1a2e2f94143d73be72634943c883ac92620bae76b8a8848d39fbf32a53eb9 |