comments_scrap: Scrape HTML comments from a web page

View source: R/comments_scrap.R

comments_scrapR Documentation

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)

Arguments

link

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


link <- "https://example.com"
comments_scrap(link)



ralger documentation built on Aug. 8, 2025, 7:50 p.m.