Rcrawler icon indicating copy to clipboard operation
Rcrawler copied to clipboard

how to run Javascript tag before extracting data from each page

Open hamedf62 opened this issue 5 years ago • 2 comments

hi and good day

as i need to extract comments from a page, as long texts are hided and need to push "read more" link at first, it done by javascript code.

so i need to run a scripts in each page before extracting data.

kindly advice how its possible...

warm regards

hamedf62 avatar Oct 12 '19 07:10 hamedf62

I am also facing the same issue. Mr. developer, your reply would be highly appreciated :))

omar-elmaria avatar Feb 07 '22 20:02 omar-elmaria

BY default, I don't think rcrawler is the perfect tool to do that, I would recommend using selenium or puppeteer both can be used via an R package too.

It might be possible to get the data by looking at which URL is being called (inside the network panel of your browser) when you click on loadmore. It depends on how the website is built.

pixgarden avatar Feb 08 '22 09:02 pixgarden