Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Improving documentation

Jan Curn1e758f122071
diff --git a/src/pseudo_url.js b/src/pseudo_url.js
index a6ee39189..817db29d6 100644
--- a/src/pseudo_url.js
+++ b/src/pseudo_url.js
@@ -5,6 +5,7 @@ import Request from './request';
/**
* Parses PURL into Regex string.
+ * @ignore
*/
const parsePurl = (purl) => {
const trimmedPurl = purl.trim();
diff --git a/src/puppeteer_live_view_server.js b/src/puppeteer_live_view_server.js
index b6ab887fc..4bc7df428 100644
--- a/src/puppeteer_live_view_server.js
+++ b/src/puppeteer_live_view_server.js
@@ -19,6 +19,7 @@ const DEFAULT_SCREENSHOT_TIMEOUT_MILLIS = 3000;
* @param {Browser} browser A Puppeteer Browser instance.
* @param {String} [options.id] A unique ID of the LiveViewBrowser.
* @param {Number} [options.screenshotTimeoutMillis] Max time allowed for the screenshot taking process.
+ * @ignore
*/
export class PuppeteerLiveViewBrowser extends EventEmitter {
constructor(browser, opts = {}) {
@@ -225,6 +226,7 @@ let liveViewServer;
* @param {String} [opts.id] Custom ID to be used with the browser instance.
* @param {String} [opts.screenshotTimeoutMillis] Max time allowed for the screenshot taking process.
* @returns {Promise<PuppeteerLiveViewServer>}
+ * @ignore
*/
export const registerBrowserForLiveView = (browserPromise, opts = {}) => {
let serverPromise = Promise.resolve();
@@ -263,6 +265,7 @@ export const registerBrowserForLiveView = (browserPromise, opts = {}) => {
* @param {WebSocket} socket
* @param {String} command Name of requested command.
* @param {Object} data Data to be sent.
+ * @ignore
*/
const sendCommand = (socket, command, data) => {
const payload = JSON.stringify({ command, data });
@@ -275,6 +278,7 @@ const sendCommand = (socket, command, data) => {
* Enables live monitoring of actor execution by spawning a web server that responds with a list
* of available browsers at its root path. Once the user chooses a browser, PuppeteerLiveViewServer will
* periodically serve screenshots of the selected browser's latest loaded page.
+ * @ignore
*/
export default class PuppeteerLiveViewServer extends EventEmitter {
constructor() {
diff --git a/src/puppeteer_utils.js b/src/puppeteer_utils.js
index 108fe683a..75864adbc 100644
--- a/src/puppeteer_utils.js
+++ b/src/puppeteer_utils.js
@@ -59,6 +59,7 @@ const hideWebDriver = async (page) => {
* @param {Page} page Puppeteer [Page](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-page) object.
* @param {String} filePath File path
* @return {Promise}
+ * @memberof utils.puppeteer
*/
const injectFile = async (page, filePath) => {
checkParamOrThrow(page, 'page', 'Object');
diff --git a/src/utils.js b/src/utils.js
index b49fb9ae9..b82512887 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -300,7 +300,7 @@ export const getTypicalChromeExecutablePath = () => {
* Creates a promise that after given time gets rejected with given error.
*
* @return {Promise<Error>}
- * @ignore.
+ * @ignore
*/
export const createTimeoutPromise = (timeoutMillis, errorMessage) => {
return delayPromise(timeoutMillis).then(() => {