Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pastedeno/mod.ts>Scraper

Universal Pastebin client for Deno/Node
Latest
class Scraper
import { Scraper } from "https://deno.land/x/pastedeno@0.6.2/mod.ts";

Constructors

new
Scraper(opts?: ScrapeOptions, fetch?: globalThis.fetch)

Properties

readonly
fetch: globalThis.fetch
lastKeys: string[]

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.

Static Properties

version: string