selectors config file
eklem opened this issue · comments
Espen Klem commented
Split out the selectors config to a .json-file so it's less scary to make it match your content. Should be required in the main.js file
Espen Klem commented
Skip the require-step and just fetch the JSON file with the fetch API. Format of setup.json can be like this:
{
"urls": [
"https://example.com/1",
"https://example.com/2",
"https://example.com/3"
],
"selectors": {
"title": "$('title').text()",
"body": "$('body').text()"
}
}
Espen Klem commented
Not a config file, but the crawler should take it as input, so a setup/config step