# \donttest{
if (curl::has_internet()) {
# Single party
get_party_color("https://en.wikipedia.org/wiki/Democratic_Party_(United_States)")
# Multiple parties
urls <- c(
"https://en.wikipedia.org/wiki/Democratic_Party_(United_States)",
"https://en.wikipedia.org/wiki/Republican_Party_(United_States)"
)
get_party_color(urls)
# Get all colors (some parties have multiple)
get_party_color(urls, all_colors = TRUE)
}
# }
Run the code above in your browser using DataLab