search for: html_text

Displaying 7 results from an estimated 7 matches for "html_text".

Did you mean: html2text
2018 Jan 23
1
Scraping from different level URLs website
...g/country?lang=en&page=projects" WB_proj <- function(x) { Sys.sleep(5) 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&...
2023 Jul 26
1
Downloading a directory of text files into R
...library(rvest) }) # destination directory, change this at will dest_dir <- "~/Temp" # first get the two subfolders from the Data webpage link <- "http://home.brisnet.org.au/~bgreen/Data/" page <- read_html(link) page %>% html_elements("a") %>% html_text() %>% grep("/$", ., value = TRUE) -> sub_folder # create relevant disk sub-directories, if # they do not exist yet for(subf in sub_folder) { d <- file.path(dest_dir, subf) if(!dir.exists(d)) { success <- dir.create(d) msg <- paste("created directory...
2016 Dec 06
2
rvest
...n 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() > text character(0) Miré mi código viejo junto con el sitio que funciona, pero le hice una modificación para que ande (algo en el xpath) pero hoy no recuerdo la parte técnica. Básicamente hay una lista y recorro los elementos de esta (como si fuese una tabla, pero no lo es), tomand...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...scroll (SwfdecTextFieldMovie * text, int value); -const char * swfdec_text_field_movie_get_variable_text (SwfdecTextFieldMovie * text); -void swfdec_text_field_movie_set_variable_text (SwfdecTextFieldMovie *text, - const char * value); const char * swfdec_text_field_movie_get_html_text (SwfdecTextFieldMovie * text); +void swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie * text, + const char * value); +void swfdec_text_field_movie_set_listen_variable_text (SwfdecTextFieldMovie *text, + const char * value); /* implemented in swfdec_text_fie...
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
2005 Dec 23
10
truncating html text
I''ve got a fairly basic problem here that I''m hoping there is an easy solution for. I have a chunk of html code that I want to truncate to a given length... say 20 characters or so. If I use the ''truncate'' helper function I end up with unbalanced tags. For example. <a href=www.someplace.com>A really long string of words</a> becomes <a
2018 Jan 18
0
Web scraping different levels of a website
...l <- ("http://catalog.ihsn.org/index.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=") read_html(url) %>% html_nodes(".title a") %>% html_text() %>% as.data.frame() }) %>% do.call(rbind, .) I have repeated the same code in order to get all the data I was interested in and it seems to work perfectly, although is of course a little slow due to the Sys.sleep() thing. My issue has raised once I have tried to scrape the single projects...