find_thread_urls {RedditExtractoR} | R Documentation |
Find Reddit thread URLs
Description
Find URLs to reddit threads of interest. There are 2 available search strategies: by keywords and by home page. Using a set of keywords Can help you narrow down your search to a topic of interest that crosses multiple subreddits whereas searching by home page can help you find, for example, top posts within a specific subreddit
Usage
find_thread_urls(
keywords = NA,
sort_by = "top",
subreddit = NA,
period = "month"
)
Arguments
keywords |
A optional string that you want to search for, e.g. "cute kittens". If NA, then either your front page will be searched or the front page of a specified subreddit |
sort_by |
A string representing how you want Reddit to sort the results. Note that this string is conditional on whether you are searching by keywords or not. If you are searching by keywords, then it must be one of: relevance, comments, new, hot, top; if you are not searching by keywords, then it must be one of: hot, new, top, rising |
subreddit |
(optional) A string representing the subreddit of interest |
period |
A string representing the period of interest (hour, day, week, month, year, all) |
Value
a data frame with URLs to Reddit threads that are relevant to your input parameters
Examples
## Not run:
find_thread_urls(keywords="cute kittens", subreddit="cats", sort_by="new", period="month")
find_thread_urls(subreddit="cats", sort_by="rising", period="all")
## End(Not run)