Skip to contents

[Works on: Unofficial API]

This is the version of tt_search that explicitly uses the unofficial API. Use tt_search_api for the Research API version.

Usage

tt_search_hidden(
  query,
  offset = 0,
  max_pages = Inf,
  sleep_pool = 1:10,
  max_tries = 5L,
  cookiefile = NULL,
  verbose = TRUE
)

Arguments

query

query as one string

offset

how many videos to skip. For example, if you already have the first X of a search.

max_pages

how many pages to get before stopping the search.

sleep_pool

a vector of numbers from which a waiting period is randomly drawn.

max_tries

how often to retry if a request fails.

cookiefile

path to your cookiefile. See vignette("unofficial-api", package = "traktok") for more information on authentication.

verbose

logical. Print status messages.

Value

a data.frame

Details

The function will wait between scraping two videos to make it less obvious that a scraper is accessing the site. The period is drawn randomly from the `sleep_pool` and multiplied by a random fraction.

Examples

if (FALSE) { # \dontrun{
tt_search_hidden("#rstats", max_pages = 2)
} # }