Created
August 1, 2018 14:51
-
-
Save matt-dray/9241c829b6040b97dc85aa926acd3173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(Rcrawler) | |
library(purrr) | |
library(httr) | |
x <- c( | |
"https://rostrum.blog", | |
"https://therostrumblog.wordpress.com/" | |
) | |
crawl_vector <- function(x){ | |
map( | |
x, | |
Rcrawler, | |
KeywordsFilter = c("dray", "adriana"), DIR = "test_html" | |
) %>% | |
setNames(x) %>% | |
map_df(bind_rows, .id="id") | |
} | |
crawl_vector(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment