search for: html_attr

Displaying 5 results from an estimated 5 matches for "html_attr".

2018 Jan 19
1
Web scraping different levels of a website
...quot;to={year_to}&", "sort_order=&sort_by=nation&_=1516371984886") # read in the html x <- url %>% GET() %>% content() # option 1 (div with class "survey-row" --> data-url attribute) x %>% html_nodes(".survey-row") %>% html_attr("data-url") # option 2 (studies titles are <a> within <h2> elems) # note that this give you some more information like the title ... x %>% html_nodes("h2 a") greetings, david On 18 January 2018 at 12:58, David Jankoski <david.jankoski at hellotrip.nl>...
2016 Dec 06
2
rvest
Estimados Hace un tiempo que no uso rvest, corrí un código viejo, anda sin problemas, escribo el nuevo y hay algo que me olvide. Básicamente desde el navegador de internet selecciono el xpath, copio y pego este en R, pero me sale el siguiente error. > text <- Pagina.R %>% + html_nodes(xpath='//*[@id="content"]/p')%>% + html_text() >
2018 Jan 23
1
Scraping from different level URLs website
...url <- sprintf("http://projects.worldbank.org/search?lang=en&searchTerm=&countrycode_exact=%s", x) html <- read_html(url) tibble(title = html_nodes(html, ".grid_20") %>% html_text(trim = TRUE), project_url = html_nodes(html, ".grid_20") %>% html_attr("href")) } WB_scrape <- map_df(1:5, WB_proj) %>% mutate(study_description = map(project_url, ~read_html(sprintf ("http://projects.worldbank.org/search?lang=en&searchTerm=&countrycode_exact=%s", .x)) %>% html_node() %>...
2015 Dec 23
5
Instrucciones uso rvest
Hola buenos días: Os remito una duda (en un documento word para su mejor expresión) sobre el uso de la libreria rvest. Mi problema es que como no soy informatico me pierdo un poco, he visto los ejemplos que hay colgados y los he seguido, pero el tema es que quiero acceder a los datos del INE, que en ocasiones estan un poco escondidos con menu de selecciones y no se como hacerlo con rvest para
2018 Jan 18
0
Web scraping different levels of a website
...x.php/catalog#_r=&collection=&country=&dtype=&from=1890&page=1&ps=100&sid=&sk=&sort_by=nation&sort_order=&to=2017&topic=&view=s&vk=" x <- url %>% GET() %>% content() x %>% html_nodes(".survey-row") %>% html_attr("data-url") hth. david