Esto parece ser posible en Scrapy Scrapy y respecto a robots.txt , pero ¿hay una forma sencilla de hacerlo en Puppeteer?
No he encontrado una manera fácil de incorporar "respetar a los robots" en los comandos de Titiritero.
No creo que el titiritero tenga nada incorporado, pero puede usar el titiritero para acceder a robots.txt y luego usar cualquiera de los módulos npm para analizar robots.txt y ver si tiene permiso para obtener una URL en particular. Por ejemplo, así es como podría usar robots-txt-parser :
const robotsParser = require('robots-txt-parser') const robots = robotsParser() // Now inside an async function // (or not if using a version of Node.js that supports top-level await) await robots.useRobotsFor('https://example.com/') if (await robots.canCrawl(urlToVisit)) { // Do stuff with puppeteer here to visit the URL } else { // Inform the user that sadly crawling that URL is forbidden }