Displaying 1 result from an estimated 1 matches for "grid_20".
Did you mean:
grid2
2018 Jan 23
1
Scraping from different level URLs website
.../projects.worldbank.org/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.world...