iherb product scraper, searcher and sorter based on nutrients, price
iherb scraper to filter and find a product based on nutrients
Multi-vitamins comparison. Cells display the daily value % (DV) if it exists, otherwise the amount. If a cell shows ***, no value was found. Checkbox filters a nutrient to contain >=100 DV. Sort by price per serve, price, number of vitamins, minerals.
pip install -r requirements.txt
to install required packagesGenerate results with iherb_scraper.py
$ python iherb_scraper <outfile>
If no <outfile>
is specified, output is saved to results.json
in root folder.
Alternatively, you may edit iherb_scraper.py
and call process_category
:
process_category (filename, category='multivitamins')
filename
- outfile to save results. If blank, nothing is saved.category
- iherb category to perform scraping.multivitamins
, enzymes
. You can check if a category exists by typing in the URL http://iherb.com/<catgory>
nutrients.json
. In that json file, the keys are the nutrient names and the value array contains any alternative names.Results are rendered client-side using nunjunks
npm install
grunt
index.html
in the dest
foldergrunt dev
(livereloads)Links contain my referral code. Feel free to remove. Otherwise, I am not affliated with the company.
Greatly welcomed! :)