Skip to content

Commit

Permalink
fix bug in pb_available()
Browse files Browse the repository at this point in the history
  • Loading branch information
JBGruber committed Nov 6, 2023
1 parent 3265b1a commit 22e2e76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: paperboy
Title: Comprehensive Collection of News Media Scrapers
Version: 0.0.5.9000
Date: 2023-11-04
Date: 2023-11-06
Authors@R:
person(given = "Johannes B.",
family = "Gruber",
Expand Down
8 changes: 4 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pb_available <- function(...) {
dots <- unlist(list(...), recursive = TRUE)

if (length(dots) > 0) {
return(unlist(sapply(dots, function(x) adaR::ada_get_domain(x) %in% parsers,
return(unlist(sapply(dots, function(x) url_get_domain(x) %in% parsers,
simplify = FALSE, USE.NAMES = TRUE)))
}

Expand Down Expand Up @@ -127,11 +127,11 @@ make_pb <- function(df) {

#' tick progress bar
#' @noRd
pb_tick <- function(x, verbose, pb) {
pb_tick <- function(x, verbose, pb, ...) {
if (verbose > 1) {
cli::cli_progress_step(x$expanded_url)
cli::cli_progress_step(x$expanded_url, ...)
} else if (verbose > 0) {
cli::cli_progress_update(status = paste0("(", x$domain, ")"), id = pb)
cli::cli_progress_update(status = paste0("(", x$domain, ")"), id = pb, ...)
}
}

Expand Down

0 comments on commit 22e2e76

Please sign in to comment.