UNPKG

@alline/core

Version:

Core for Alline.

20 lines 691 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EpisodeScraper = void 0; const tapable_1 = require("tapable"); class EpisodeScraper { constructor() { this.scrapHooks = { before: new tapable_1.AsyncSeriesWaterfallHook(["ctx"]), after: new tapable_1.AsyncSeriesWaterfallHook(["rlt", "ctx"]) }; } async scrap(rlt, ctx) { const { before, after } = this.scrapHooks; const newCtx = await before.promise(ctx); const result = await this.onScrap(rlt, newCtx); return after.promise(result, ctx); } } exports.EpisodeScraper = EpisodeScraper; //# sourceMappingURL=episode.js.map