Web scraping dynamic

https://csr.gov.in/content/csr/global/master/home/home/csr-expenditure--geographical-distribution/state/district/companies.html?=South%20West%20Delhi=Delhi=FY%202020-21

This is a website I have been trying to scrape data from. Tried multiple ways using R Selenium. It always ends in error. I have foundational knowledge of R. Can someone please help me with how to approach the problem. Need help!!!

library(chromote)

b <- ChromoteSession$new()
b$parent$debug_messages(TRUE)
b$Page$navigate("https://csr.gov.in/content/csr/global/master/home/home/csr-expenditure--geographical-distribution/state/district/companies.html?=South%20West%20Delhi=Delhi=FY%202020-21")
Sys.sleep(30) # the site is super slow, so you have to wait a long time for it 
x1 <- b$DOM$getDocument()
x <- b$DOM$querySelector(x1$root$nodeId, "#compTableBody")
b$DOM$getOuterHTML(x$nodeId)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.