Learn R Programming

healthforum (version 0.1.0)

scrape_user_posts: Scrape a user's posts

Description

Get all posts/replies one user has sent by his/her user name

Usage

scrape_user_posts(user_profile_url, type = c("both", "replies",
  "topic_post"))

Arguments

user_profile_url

The URL of a user's profile page.

type

Choose a type of posts to be scraped. It includes "replies", i.e., a user's replies to others' posts, or "topic_post", i.e., a user's initial posts. The default is to get "both"

Value

A data frame

Examples

Run this code
# NOT RUN {
user_profile_url <- "https://patient.info/forums/profiles/utgh4k33-1264038"
scrape_user_posts(user_profile_url = user_profile_url, type = "both")


# }

Run the code above in your browser using DataLab