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.

Temporaroly enabled selenium logging

Jan Curn75a0438121cd
diff --git a/src/browser.js b/src/browser.js
index 8c9cd4b0a..676d2bfc8 100644
--- a/src/browser.js
+++ b/src/browser.js
@@ -48,9 +48,13 @@ export class Browser {
}
// This is an optional dependency because it is quite large, only require it when used
- const { Capabilities, Builder } = require('selenium-webdriver'); // eslint-disable-line global-require
+ const { Capabilities, Builder, logging } = require('selenium-webdriver'); // eslint-disable-line global-require
const chrome = require('selenium-webdriver/chrome'); // eslint-disable-line global-require
+ logging.installConsoleHandler();
+ logging.getLogger('webdriver.http').setLevel(logging.Level.ALL);
+
+
// See https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities for reference.
this.capabilities = new Capabilities();
this.capabilities.set('browserName', this.options.browserName);