Description rtweet extensions Tweet ID scrapers
The twscrape
package implements functionality to extract data from Twitter.
Specifically, it provides an interface to seamlessly screen-scrape tweet IDs, and it extends rtweet
functionality (see https://rtweet.info/).
rtweet
extensionstwscrape
implements the follwing extensions of rtweet
functionality:
get_api_request_limits
:
Passes query
to rate_limits
and returns current rate limit and reset time.
get_all_tweets
:
Gets all rtweets for a given account in a fixed data window, taking care of rate limiting.
read_tweets_data
:
Reads tweets data frame as returned by lookup_statuses
and written to disk by get_all_tweets
,
and returns a tibble
data frame with columns as specified by argument fields
.
twscrape
implements the follwing functionality to screen-scrape tweet IDs:
scrape_tweet_ids
:
Given a twitter account screen name or ID, and start and end dates, it screen-scrapes IDs and returns them in a data frame.
Also allows to additionally write IDs as a JSON file to to disk.
get_user_tweet_ids
:
Given a start and end date, function looks for tweet ID files already to disk
and gets tweet IDs for the remaining date range(s) by calling scrape_tweet_ids
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.