beautify fetching
This commit is contained in:
+6
-3
@@ -16,9 +16,12 @@ download_protocol <- function(path, name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetch_batch <- function(offset) {
|
fetch_batch <- function(offset) {
|
||||||
url <- mk_url(offset)
|
mk_url(offset) %>%
|
||||||
res <- as.character(read_html(url))
|
read_html() %>%
|
||||||
paths <- str_match_all(res, "/resource/blob/.*?/([0-9]*-data\\.xml)")[[1]]
|
as.character() %>%
|
||||||
|
str_match_all("/resource/blob/.*?/([0-9]*-data\\.xml)") %>%
|
||||||
|
`[[`(1) ->
|
||||||
|
paths
|
||||||
mapply(download_protocol, paths[,1], paths[,2])
|
mapply(download_protocol, paths[,1], paths[,2])
|
||||||
return(length(paths) > 0)
|
return(length(paths) > 0)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user