Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205399

Web scraping html with rvest and R

$
0
0

I would like to web scrape this web site https://www.askramar.com/Ponuda . First, I should scrape all the links that lead to each car page. The extended links look like this in the html structure:

enter image description here

I tried the following code but I get an empty object in R:

url <- "https://www.askramar.com/Ponuda"
html_document <- read_html(url)


links <- html_document %>%
  html_nodes(xpath = '//*[contains(concat("", @class, ""), concat("", "vozilo", ""))]') %>%
  html_attr(name = "href") 

Is it javascript on web page? Please help! Thanks!


Viewing all articles
Browse latest Browse all 205399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>