Learn R Programming

ralger (version 2.3.0)

comments_scrap: Scrape HTML comments from a web page

Description

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

Usage

comments_scrap(link, askRobot = FALSE)

Value

A character vector of HTML comments found on the page.

Arguments

link

Character. The URL of the web page to scrape.

askRobot

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

Examples

Run this code
# \donttest{
link <- "https://example.com"
comments_scrap(link)
# }

Run the code above in your browser using DataLab