Skip to main content

python package that implement a scraping for israeli supermarket data

Project description

Israel Supermarket Scraper: Clients to download the data published by the supermarkets.

This is a scraper for ALL the supermarket chains listed in the GOV.IL site.

שקיפות מחירים (השוואת מחירים) - https://www.gov.il/he/departments/legalInfo/cpfta_prices_regulations

Unit & Integration Tests CodeQL Pylint Publish Docker image Upload Python Package


Scheduled Automatic Testing: The test-suite is scheduled to run every three days, so you can see if the supermarket chains has chanced something in their interface and the package will not work probably. however, the tests running here are also integration tests with the APIs which may fail.

Status: Scheduled Tests

Notice:

  • NETIV_HASED is disabled in testing becuase it started failing at Oct' 2023.

Got a question?

You can email me at erlichsefi@gmail.com

If you think you've found a bug:

  • Create issue in issue tracker to see if it's already been reported
  • Please consider solving the issue by yourself and creating a pull request.

What is il_supermarket_scarper?

There are alot of projects in github trying to scrape the supermarket data, most of them are not stable or wasn't updated for a while, it's about time there will be one codebase that does the work completely.

You only need to run the following code to get all the data currently shared by the supermarkets.

from il_supermarket_scarper import MainScrapperRunner

scraper = MainScrapperRunner()
scraper.run()

Please notice! since new files are constantly uploaded by the supermarket to their site, you will only get the current snapshot. In order to keep geting data, you will need to run this code more the one time to get the newly uploaded files.

Quick start

il_supermarket_scarper can be installed using pip:

python3 -m pip install -U il-supermarket-scraper

If you want to run the latest version of the code, you can install from the repo directly:

python3 -m pip install -U git+https://github.com/erlichsefi/israeli-supermarket-scarpers.git
# or if you don't have 'git' installed
python3 -m pip install -U https://github.com/erlichsefi/israeli-supermarket-scarpers/master

Running Docker

The docker is designed to run the scaper every 6 hours, (you change the cron expression if you would like, checkout the file 'crontab'), in every itreation the scraper will collect the files avaliabe to download and check if the file alreay exists before fetching it, either by scaning the dump folder, or checking the mongo.

docker-compose up -d

or if you want to use the existing image from docker hub:

docker pull erlichsefi/israeli-supermarket-scarpers:latest

Contributing

Help in testing, development, documentation and other tasks is highly appreciated and useful to the project. There are tasks for contributors of all experience levels.

If you need help getting started, don't hesitate to contact me.

Development status

IL SuperMarket Scraper is beta software, as far as i see devlopment stoped until new issues will be found.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

il-supermarket-scraper-0.3.1.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

il_supermarket_scraper-0.3.1-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file il-supermarket-scraper-0.3.1.tar.gz.

File metadata

  • Download URL: il-supermarket-scraper-0.3.1.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for il-supermarket-scraper-0.3.1.tar.gz
Algorithm Hash digest
SHA256 173afaf55db107249f0740a787e59f9dbace0d8f469d005efdacf86103ab80e0
MD5 5b53cb7255b18a0369e1407b84d33934
BLAKE2b-256 562d4a37cea90fc70ed7fe0d5b9f310af12e916415cb0beafd9085b0346a13ed

See more details on using hashes here.

File details

Details for the file il_supermarket_scraper-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for il_supermarket_scraper-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60a6c66996d560ecebb698ee59ee1f7513a9a8348b26ae9d3cfa38645bf04356
MD5 4cc8a34090f96881ec489b3ca7fc9b99
BLAKE2b-256 e6e945057debb58bc95fc2bb11dd8233d8d9686adabf7c6bc1a57d910c2c90c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page