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

Data Scraping with R

$
0
0

I am very new at using R and I am trying to scrape a table off a webpage. I think I am having trouble identifying the CSS selector and that's why I am getting an error message but I'm not sure. Can anyone take a look at this and help me out? If it's easier - I really only need the maintenance information - not the whole table, but I couldn't figure out how to obtain that either.

The code I am using:

library('rvest')
library('xml2')
url<- 'https://www.kbb.com/toyota/rav4-hybrid/2019/le/?vehicleid=441180&intent=buy-new'
temp <- url %>% read_html %>% html_nodes('.col-base-6') %>% html_table()
temp[[1]]
Error in temp[[1]] : subscript out of bounds

I would really appreciate it if anyone can help me out with this!

Thanks, Lisa


Viewing all articles
Browse latest Browse all 201867

Trending Articles



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