I am trying to scrape https://www.freelance.nl/opdrachten/zoeken for data using Request and Cheerio but I am running into issues posting search terms.
I cannot see where the search string and selected category are sent during the post when using the site and how I can use them in Request to automate searches from my node application.
Basically I want to be able to send different search terms using Request then I can scrape the returned html for the data I need.
So far I have this:
request.post('https://www.freelance.nl/opdrachten/zoeken', { form: { key: 'value' } },
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body)
}
}
);
But as I cannot see where the form data is stored in dev tools, I cannot send the correct values in the 'form' object. I'm pretty sure it's in request payload, but how do I get to that from my node application?
Is there an easier way to do this? Am I completely wasting my time?