import { Scraper } from "https://deno.land/x/pastedeno@0.6.2/mod.ts";
Constructors
new
Scraper(opts?: ScrapeOptions, fetch?: globalThis.fetch)Methods
getLast(): Promise<ScrapePaste>
Scrapes the last paste.
getMeta(key: string): Promise<ScrapePaste>
Gets the paste meta.
getRaw(key: string): Promise<string>
Gets the raw paste.
on(eventName: "start", handler: () => void): void
Adds an event listener.
on(eventName: "stop", handler: () => void): void
on(eventName: "error", handler: (error: Error) => void): void
on(eventName: "scrape", handler: (data: ScrapePaste[]) => void): void
on(eventName: "new", handler: (data: ScrapePaste) => void): void
singleScrape(limit?: number): Promise<ScrapePaste[]>
Scrapes pastes.
start(): void
Starts the scraper.
stop(): void
Stops the scraper.