Scrapes all products from coldweb systems, such as the ValleyFoods Site.
- Clone the repo
- Run
npm install
- Open the config file and set the
siteUrl
to the intended URL - Create an account on the coldweb site
- Log in to the account
- Find the
PHPSESSID
cookie, copy the value and set thetoken
property in the config to that value - Run the program!
list-categories
- Prints a list of all categories to the consolescrape-all <output> [--format -f] [--with-extra-data -e]
- Scrapes all product data from the site<output>
Specify the output file path--format <json|csv>
Specifies the format to output the data in (default:json
)--with-extra-data
If set, will scrape each product page individually to retrieve a description, allergen info and more. This can add considerably more time
The websites below have been confirmed as working with this tools. I imagine all coldweb sites will work, but I can't confirm that.
Below is an example JSON output. You can get a CSV output by specifying --format csv
or -f csv
.
[
{
"name": "Liffey Ribeye 4kg+",
"sku": "520",
"price": "ยฃ82.99",
"inStock": true,
"unit": "av.4.00Kg",
"stockCount": "10+",
"link": "https://valley.coldweb.co.uk/ordering/pages/product_info.php?products_id=520",
"brand": "LIFF"
}
]