Debug

debug: boolean | false;

What's This?

The debug option offers insights into the inner workings of the scraping process. When enabled, it returns detailed information about the requests made to fetch content, the ones that were blocked, and some aggregated statistics about these requests.

How Does it Work?

  • Default (debug=false): The scraper returns the website's content without any additional details.

  • With (debug=true and response_format=’json’):Along with the website's content, the scraper provides a summary of the content-loading requests, highlighting the number of requests, the total data fetched, and the overall time taken.

When Should I Use This?

Activate debug if you want to understand how the scraper is interacting with the website, especially if you're trying to optimize the scraping process or troubleshoot potential issues.

Methods

useDebugger(boolean) 

Configuration Name: debug

Initializing Scraper

const GeonodeScraperApi = require('geonode-scraper-api');
const scraper = new GeonodeScraperApi('<Your_username>', '<Your_password>');

Using Method

scraper.useDebugger(true);
scraper.scrape('https://example.com/');

Using Configuration Object

const config = { debug: true };
scraper.scrape('https://example.com/', config);