javascript - How to find where form parameters are stored and use them in Request -


i trying scrape https://www.freelance.nl/opdrachten/zoeken data using request , cheerio running issues posting search terms.

i cannot see search string , selected category sent during post when using site , how can use them in request automate searches node application.

basically want able send different search terms using request can scrape returned html data need.

so far 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 cannot see form data stored in dev tools, cannot send correct values in 'form' object. i'm pretty sure it's in request payload, how node application?

is there easier way this? wasting time?

dev tools screenshot

i've slighly modified code:

payload = {'projectfilterform[keywords]':'javascript','projectfilterform[category][]': '1'} request.post('https://www.freelance.nl/opdrachten/zoeken', { data:payload }, function (error, response, body) {     if (!error && response.statuscode == 200) {         console.log(body)     } } 

);


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -