Extracts HTML comments (<!– comment –>) from a webpage. Useful for detecting hidden notes, debug info, or developer messages.

comments_scrap(link, askRobot = FALSE)

Arguments

Character. The URL of the web page to scrape.

askRobot

Logical. Should the function check robots.txt before scraping? Default is FALSE.

Value

A character vector of HTML comments found on the page.

Examples

# \donttest{
link <- "https://example.com"
comments_scrap(link)
#> No HTML comments found.
#> [1] NA
# }