@hanivanrizky/nestjs-html-parser
Version:
⚠️ ARCHIVED - This package is no longer maintained. Please migrate to @hanivanrizky/nestjs-xpath-parser (https://github.com/Hanivan/nestjs-xpath-parser)
24 lines (23 loc) • 863 B
TypeScript
/**
* SSL and Dead Domain Handling Example
*
* This example demonstrates how to handle various network issues when scraping:
* - SSL certificate errors (expired, self-signed, invalid)
* - Dead domains (DNS resolution failures)
* - Connection timeouts and refused connections
* - Rate limiting and network issues
*
* These scenarios are common when scraping websites that may have
* configuration issues or become temporarily/permanently unavailable.
*/
interface ScrapeResult {
url: string;
success: boolean;
title?: string;
error?: string;
errorType?: string;
retryCount?: number;
}
declare function demonstrateSSLAndErrorHandling(verbose?: boolean): Promise<void>;
export declare function testUrlWithRobustConfig(url: string, verbose?: boolean): Promise<ScrapeResult>;
export { demonstrateSSLAndErrorHandling, ScrapeResult };