snscrape_search: Wrapper to undertake historical searches calling Python...

View source: R/SNscrape_functions.R

snscrape_searchR Documentation

Wrapper to undertake historical searches calling Python snscrape library.

Description

Calls Python script to pull status URLs of a search, rtweet to rehdrate those statuses. See https://github.com/JustAnotherArchivist/snscrape

Usage

snscrape_search(
  search_string,
  since_date = NULL,
  until_date = NULL,
  n = 100,
  file = "temp",
  token = NULL,
  delete_tempfile = TRUE
)

Arguments

search_string

A search string (in quotes)

since_date

Start date for the search (iso format date in quotes)

until_date

Latest date for the search (iso format date in quotes NB: search works backward)

n

Maximum number of results - twitter API has 90k rate-limit per 15 minutes

file

temporary file name for snscrape URL list, timestamp will be appended.

token

An OAuth token loaded in the environment for twitter's Standard API (if not specified, default token will be used)

delete_tempfile

Clear temp file of statuses default = TRUE

Examples

test <- snscrape_search("Trump", since_date = "2016-09-06", until_date = "2016-11-06", n = 1000, file = "test_", token = NULL)

Arf9999/rtweetXtras documentation built on June 27, 2022, 5:10 a.m.