Skip to content

Commit

Permalink
Merge pull request #262 from ropensci/hot-fix
Browse files Browse the repository at this point in the history
Fix too many requests error
  • Loading branch information
trangdata committed Jul 5, 2024
2 parents 8bd7dd2 + 32a6303 commit 774aff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/oa_fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ oa_request <- function(query_url,
if (verbose) cat("\nDownloading groups...\n|")
while (!is.null(next_page)) {
if (verbose) cat("=")
Sys.sleep(1 / 100)
Sys.sleep(1 / 10)
query_ls[[paging]] <- next_page
res <- api_request(query_url, ua, query = query_ls)
data <- c(data, res[[result_name]])
Expand Down Expand Up @@ -391,7 +391,7 @@ oa_request <- function(query_url,
res <- NULL
for (i in pages) {
if (verbose) pb$tick()
Sys.sleep(1 / 100)
Sys.sleep(1 / 10)
next_page <- get_next_page(paging, i, res)
query_ls[[paging]] <- next_page
res <- api_request(query_url, ua, query = query_ls)
Expand Down

0 comments on commit 774aff7

Please sign in to comment.