R/qwant.R

Defines functions qwant

Documented in qwant

#' Search Qwant
#' @description Improve your workflow by searching Qwant directly from the console without having to switching to the browser and
#' opening a new tab first.
#' @param search_terms Search terms encapsulated in " ".
#' @keywords qwant internet workflow
#' @examples
#' qwant("my search terms")
#' @export

qwant <- function(search_terms) {
  if (missing(search_terms)) {
    message("Opening Qwant in browser")
    browseURL(paste0("https://www.qwant.com"))
  }
  else {
  message("Opening Qwant search for \"", search_terms, "\" in browser")
  browseURL(paste0("https://www.qwant.com/?q=", URLencode(search_terms)))
  }
}
fschaffner/websearchr documentation built on Sept. 28, 2019, 10:15 a.m.