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.

596 B
Raw Blame
/**
 * Shared base for the file-system resource backends. The native id is read once from the native
 * metadata at construction time (in each backend's `create()`), so the synchronous `id` getter —
 * required by `FileSystemStorageBackend.storageExists` and the cache lookups — does not have to await.
 */
export abstract class CachedIdClient {
    /** The storage id assigned by the native client. Set once by the subclass `create()`. */
    protected cachedId!: string;

    /** The storage id assigned by the native client. */
    get id(): string {
        return this.cachedId;
    }
}