/** * URL Metadata Fetching * * Scrape URLs to extract metadata: title, description, OpenGraph images, * JSON-LD structured data, creator info, categories, etc. * Results are cached to avoid re-fetching. * * Features: * - Parallel scraping (default 5 concurrent) * - Hard timeout per URL (default 4s) * - Caching via ResponseCache interface */ import type { ResponseCache } from '../caching/types'; import type { CandidateMessage } from '../types'; import type { ScrapedMetadata, ScraperConfig } from './types'; /** * Extract all unique URLs from text. */ export declare function extractUrlsFromText(text: string): string[]; /** * Extract all unique URLs from an array of candidates. * Looks in the candidate content and surrounding context. */ export declare function extractUrlsFromCandidates(candidates: readonly CandidateMessage[]): string[]; interface FetchOptions extends ScraperConfig { /** Callback when scraping starts (only called if there are uncached URLs) */ onScrapeStart?: ((info: { urlCount: number; cachedCount: number; }) => void) | undefined; /** Callback for each URL scraped (always called - success or failure) */ onUrlScraped?: ((info: { url: string; success: boolean; error?: string | undefined; current: number; total: number; }) => void) | undefined; /** Callback for debug logging */ onDebug?: ((message: string) => void) | undefined; /** Max concurrent scrapes (default 5) */ concurrency?: number | undefined; /** Cache for scrape results */ cache?: ResponseCache | undefined; } /** * Fetch metadata for a list of URLs. * Best-effort: failures are silently skipped. * Uses parallel scraping with configurable concurrency. * Caches both successes and failures to avoid re-fetching. */ export declare function fetchMetadataForUrls(urls: readonly string[], options?: FetchOptions): Promise>; export {}; //# sourceMappingURL=metadata.d.ts.map