Scrapes all products from coldweb systems, such as the ValleyFoods Site.
- Clone the repo
- Run
npm install - Open the config file and set the
siteUrlto the intended URL - Create an account on the coldweb site
- Log in to the account
- Find the
PHPSESSIDcookie, copy the value and set thetokenproperty 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-dataIf 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"
}
]