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
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.
Notice:
- Berekt is disabled in testing becuase the chain has't upload data to the site.
- some of the scrapers site are blocked to be accessed from outside of israel.
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.
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.
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
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
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.
IL SuperMarket Scraper is beta software, as far as i see devlopment stoped until new issues will be found.