wsper-js 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2793 @@
1
+ import { CanvasRenderingContext2D, Canvas } from 'canvas';
2
+
3
+ interface WsperCredentials {
4
+ cookie?: string;
5
+ csrfToken?: string;
6
+ bearerToken?: string;
7
+ apiKey?: string;
8
+ userAgent?: string;
9
+ }
10
+ type WsperPlatform = "instagram" | "youtube" | "spotify" | "twitter" | "threads" | "pinterest";
11
+ declare class CredentialsManager {
12
+ #private;
13
+ constructor(override?: WsperCredentials, defaults?: WsperCredentials);
14
+ static forPlatform(platform: WsperPlatform, override?: WsperCredentials, defaults?: Record<string, unknown>): CredentialsManager;
15
+ resolve(key: keyof WsperCredentials): string | undefined;
16
+ get cookie(): string | undefined;
17
+ get csrfToken(): string | undefined;
18
+ get bearerToken(): string | undefined;
19
+ get apiKey(): string | undefined;
20
+ get userAgent(): string | undefined;
21
+ hasCredential(key: keyof WsperCredentials): boolean;
22
+ }
23
+
24
+ declare const PLATFORM_DEFAULT_HEADERS: Record<string, Record<string, string>>;
25
+ declare function buildPlatformHeaders(platform: string, credentials: CredentialsManager): Record<string, string>;
26
+
27
+ interface WsperErrorOptions {
28
+ code?: string;
29
+ cause?: unknown;
30
+ details?: Record<string, unknown>;
31
+ }
32
+ declare class WsperError extends Error {
33
+ readonly code: string;
34
+ readonly cause?: unknown;
35
+ readonly details?: Record<string, unknown> | undefined;
36
+ constructor(message: string, options?: WsperErrorOptions);
37
+ }
38
+
39
+ interface HttpErrorOptions extends WsperErrorOptions {
40
+ statusCode?: number;
41
+ url?: string;
42
+ method?: string;
43
+ }
44
+ declare class HttpError extends WsperError {
45
+ readonly statusCode?: number | undefined;
46
+ readonly url?: string | undefined;
47
+ readonly method?: string | undefined;
48
+ constructor(message: string, options?: HttpErrorOptions);
49
+ }
50
+
51
+ declare class ParseError extends WsperError {
52
+ constructor(message: string, options?: WsperErrorOptions);
53
+ }
54
+
55
+ declare class ValidationError extends WsperError {
56
+ constructor(message: string, options?: WsperErrorOptions);
57
+ }
58
+
59
+ declare class ScraperError extends WsperError {
60
+ constructor(message: string, options?: WsperErrorOptions);
61
+ }
62
+
63
+ declare class DownloadError extends WsperError {
64
+ constructor(message: string, options?: WsperErrorOptions);
65
+ }
66
+
67
+ type Nullable<T> = T | null;
68
+ type Optional<T> = T | undefined;
69
+ type MaybePromise<T> = T | Promise<T>;
70
+ interface Timestamped {
71
+ fetchedAt: string;
72
+ durationMs: number;
73
+ }
74
+
75
+ interface HttpOptions {
76
+ timeoutMs?: number;
77
+ retries?: number;
78
+ retryDelayMs?: number;
79
+ maxRetryAfterMs?: number;
80
+ maxRedirects?: number;
81
+ headers?: Record<string, string>;
82
+ userAgent?: string;
83
+ allowPrivateNetwork?: boolean;
84
+ }
85
+ interface QueueOptions {
86
+ concurrency?: number;
87
+ intervalMs?: number;
88
+ intervalCap?: number;
89
+ minDelayMs?: number;
90
+ maxDelayMs?: number;
91
+ }
92
+ interface ScraperOptions {
93
+ credentials?: WsperCredentials;
94
+ debug?: boolean;
95
+ http?: HttpOptions;
96
+ queue?: QueueOptions;
97
+ }
98
+
99
+ interface WsperResponseMeta {
100
+ statusCode: number;
101
+ sourceUrl: string;
102
+ fetchedAt: string;
103
+ durationMs: number;
104
+ }
105
+ interface WsperErrorPayload {
106
+ code: string;
107
+ message: string;
108
+ details?: Record<string, unknown>;
109
+ }
110
+ interface WsperResponse<TData, TMeta extends WsperResponseMeta = WsperResponseMeta> {
111
+ ok: boolean;
112
+ statusCode: number;
113
+ data: TData | null;
114
+ error: WsperErrorPayload | null;
115
+ meta: TMeta;
116
+ }
117
+ declare function createSuccessResponse<TData, TMeta extends WsperResponseMeta>(input: {
118
+ code: string;
119
+ message: string;
120
+ data: TData;
121
+ meta: TMeta;
122
+ }): WsperResponse<TData, TMeta>;
123
+ declare function createErrorResponse<TMeta extends WsperResponseMeta>(error: unknown, input: {
124
+ code: string;
125
+ message: string;
126
+ meta: TMeta;
127
+ }): WsperResponse<never, TMeta>;
128
+ declare function extractStatusCode(error: unknown): number;
129
+
130
+ declare class RequestQueue {
131
+ #private;
132
+ constructor(options?: QueueOptions);
133
+ get size(): number;
134
+ get active(): number;
135
+ add<T>(task: () => Promise<T>): Promise<T>;
136
+ onIdle(): Promise<void>;
137
+ pause(): void;
138
+ resume(): void;
139
+ clear(): void;
140
+ }
141
+
142
+ interface HttpRequestOptions extends HttpOptions {
143
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
144
+ body?: RequestBody;
145
+ responseType?: "json" | "text" | "arrayBuffer";
146
+ }
147
+ interface HttpResponse<T = unknown> {
148
+ url: string;
149
+ statusCode: number;
150
+ headers: Record<string, string>;
151
+ data: T;
152
+ }
153
+ type RequestBody = string | Blob | FormData | ArrayBuffer | URLSearchParams | BufferSource | Record<string, string | number | boolean | null | undefined>;
154
+ declare class HttpClient {
155
+ #private;
156
+ constructor(options?: HttpOptions, queue?: RequestQueue);
157
+ getJson<T = unknown>(input: string | URL, options?: HttpRequestOptions): Promise<HttpResponse<T>>;
158
+ getText(input: string | URL, options?: HttpRequestOptions): Promise<HttpResponse<string>>;
159
+ request<T = unknown>(input: string | URL, options?: HttpRequestOptions): Promise<HttpResponse<T>>;
160
+ }
161
+
162
+ type LogLevel = "info" | "warn" | "error" | "debug";
163
+ declare class WsperLogger {
164
+ #private;
165
+ constructor(prefix: string, enabled?: boolean);
166
+ enable(): this;
167
+ disable(): this;
168
+ get isEnabled(): boolean;
169
+ info(message: string, data?: unknown): void;
170
+ warn(message: string, data?: unknown): void;
171
+ error(message: string, data?: unknown): void;
172
+ debug(message: string, data?: unknown): void;
173
+ }
174
+
175
+ interface ParsedHtmlMetadata {
176
+ title: string | null;
177
+ meta: Record<string, string>;
178
+ jsonLd: unknown[];
179
+ }
180
+ declare class HtmlMetadataParser {
181
+ static parse(html: string): ParsedHtmlMetadata;
182
+ static getMeta(metadata: ParsedHtmlMetadata, keys: string[]): string | null;
183
+ }
184
+
185
+ declare class JsonParser {
186
+ static parse<T = unknown>(text: string, context?: string): T;
187
+ static get<T = unknown>(data: unknown, ...keys: string[]): T | undefined;
188
+ static extractEmbedded(html: string, pattern: RegExp): unknown | null;
189
+ }
190
+
191
+ interface DownloadOptions {
192
+ maxSizeBytes?: number;
193
+ allowedMimeTypes?: string[];
194
+ overwrite?: boolean;
195
+ timeoutMs?: number;
196
+ }
197
+ interface DownloadResult {
198
+ outputPath: string;
199
+ url: string;
200
+ contentType: string | null;
201
+ sizeBytes: number;
202
+ durationMs: number;
203
+ }
204
+
205
+ declare class Downloader {
206
+ #private;
207
+ constructor(baseDir: string, logger?: WsperLogger);
208
+ download(url: string, relativePath: string, options?: DownloadOptions): Promise<DownloadResult>;
209
+ }
210
+
211
+ type BackgroundSolidConfig = {
212
+ type: "solid";
213
+ color: string;
214
+ };
215
+ type LinearGradientDirection = "to-top" | "to-bottom" | "to-left" | "to-right" | "to-bottom-right" | "to-bottom-left" | "to-top-right" | "to-top-left";
216
+ type BackgroundLinearConfig = {
217
+ type: "linear-gradient";
218
+ colors: string[];
219
+ direction: LinearGradientDirection;
220
+ };
221
+ type RadialGradientPosition = "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | {
222
+ x: number;
223
+ y: number;
224
+ };
225
+ type BackgroundRadialConfig = {
226
+ type: "radial-gradient";
227
+ colors: string[];
228
+ position: RadialGradientPosition;
229
+ };
230
+ type BackgroundConfig = BackgroundSolidConfig | BackgroundLinearConfig | BackgroundRadialConfig;
231
+ type TextAlign = "left" | "right" | "center" | "justify";
232
+ type PaddingConfig = number | {
233
+ top: number;
234
+ right: number;
235
+ bottom: number;
236
+ left: number;
237
+ };
238
+ type NormalizedPadding = {
239
+ top: number;
240
+ right: number;
241
+ bottom: number;
242
+ left: number;
243
+ };
244
+ type TextConfig = {
245
+ value: string;
246
+ align?: TextAlign;
247
+ lineHeight?: number;
248
+ color?: string;
249
+ fontFamily?: string;
250
+ fontWeight?: number | string;
251
+ fontSize?: number | "auto";
252
+ minFontSize?: number;
253
+ maxFontSize?: number;
254
+ blur?: number;
255
+ };
256
+ type CanvasPreset = "square" | "story" | "post" | "landscape" | "1:1" | "9:16" | "16:9";
257
+ type CanvasConfig = {
258
+ width?: number;
259
+ height?: number;
260
+ preset?: CanvasPreset;
261
+ aspectRatio?: string;
262
+ };
263
+ type AnimationDirection = "left-to-right" | "right-to-left";
264
+ type AnimationMode = "word" | "line" | "character";
265
+ type AnimationConfig = {
266
+ enabled?: boolean;
267
+ direction?: AnimationDirection;
268
+ mode?: AnimationMode;
269
+ duration?: number;
270
+ fps?: number;
271
+ textSpeed?: number;
272
+ };
273
+ type ImageOutputConfig = {
274
+ type: "image";
275
+ format: "png" | "jpg" | "webp";
276
+ path?: string;
277
+ };
278
+ type GifOutputConfig = {
279
+ type: "gif";
280
+ format?: "gif";
281
+ path?: string;
282
+ };
283
+ type VideoOutputConfig = {
284
+ type: "video";
285
+ format?: "mp4" | "webm";
286
+ path?: string;
287
+ codec?: string;
288
+ };
289
+ type OutputConfig = ImageOutputConfig | GifOutputConfig | VideoOutputConfig;
290
+ type BratConfig = {
291
+ canvas?: CanvasConfig;
292
+ background?: BackgroundConfig;
293
+ backgroundBlur?: number;
294
+ text: TextConfig;
295
+ layout?: {
296
+ padding?: PaddingConfig;
297
+ };
298
+ animation?: AnimationConfig;
299
+ output?: OutputConfig;
300
+ };
301
+ type StylePreset = "classic" | "blurred" | "brat-green" | "clean";
302
+ type StickerConfig = {
303
+ size?: number;
304
+ format?: "webp" | "png";
305
+ quality?: number;
306
+ };
307
+ type ConvertOptions = {
308
+ fps?: number;
309
+ quality?: number;
310
+ loop?: number;
311
+ width?: number;
312
+ height?: number;
313
+ startTime?: number;
314
+ duration?: number;
315
+ };
316
+ type BratResult = {
317
+ buffer: Buffer;
318
+ format: string;
319
+ path?: string;
320
+ };
321
+ type NormalizedAnimation = Required<Omit<AnimationConfig, "textSpeed">> & {
322
+ textSpeed: number | undefined;
323
+ };
324
+ type NormalizedBratConfig = {
325
+ canvas: {
326
+ width: number;
327
+ height: number;
328
+ };
329
+ background: BackgroundConfig;
330
+ backgroundBlur: number;
331
+ text: Required<TextConfig>;
332
+ padding: NormalizedPadding;
333
+ animation: NormalizedAnimation;
334
+ output: OutputConfig;
335
+ };
336
+
337
+ declare const CANVAS_PRESETS: Record<CanvasPreset, {
338
+ width: number;
339
+ height: number;
340
+ }>;
341
+ declare const DEFAULT_CANVAS: {
342
+ width: number;
343
+ height: number;
344
+ };
345
+ declare const DEFAULT_PADDING: NormalizedPadding;
346
+ declare const DEFAULT_TEXT: {
347
+ align: "justify";
348
+ lineHeight: number;
349
+ color: string;
350
+ fontFamily: string;
351
+ fontWeight: number | string;
352
+ fontSize: number | "auto";
353
+ minFontSize: number;
354
+ maxFontSize: number;
355
+ blur: number;
356
+ };
357
+ declare const DEFAULT_ANIMATION: {
358
+ enabled: boolean;
359
+ direction: "left-to-right";
360
+ mode: "word";
361
+ duration: number;
362
+ fps: number;
363
+ textSpeed: number | undefined;
364
+ };
365
+ declare const FFMPEG_PATH = "C:\\ffmpeg\\ffmpeg.exe";
366
+
367
+ declare function normalizeConfig(cfg: BratConfig): NormalizedBratConfig;
368
+
369
+ declare function makeCanvas(width: number, height: number): Canvas;
370
+ declare function renderBackground(ctx: CanvasRenderingContext2D, width: number, height: number, bg: BackgroundConfig): void;
371
+ declare function applyBlur(ctx: CanvasRenderingContext2D, canvas: Canvas, padding: NormalizedPadding, blur: number): void;
372
+
373
+ type WordPos = {
374
+ word: string;
375
+ x: number;
376
+ };
377
+ type LineLayout = {
378
+ words: WordPos[];
379
+ y: number;
380
+ };
381
+ declare function measureText(ctx: CanvasRenderingContext2D, text: string, fontSize: number, fontFamily: string, fontWeight: number | string): number;
382
+ declare function wrapText(ctx: CanvasRenderingContext2D, text: string, maxWidth: number, fontSize: number, fontFamily: string, fontWeight: number | string): string[][];
383
+ declare function calcAutoFontSize(ctx: CanvasRenderingContext2D, text: string, maxWidth: number, maxHeight: number, fontFamily: string, fontWeight: number | string, lineHeight: number, minFont: number, maxFont: number): number;
384
+ declare function buildLayout(ctx: CanvasRenderingContext2D, lines: string[][], fontSize: number, fontFamily: string, fontWeight: number | string, lineHeight: number, align: TextAlign, padding: NormalizedPadding, canvasWidth: number, canvasHeight: number): LineLayout[];
385
+ declare function drawLayout(ctx: CanvasRenderingContext2D, layout: LineLayout[], color: string, fontSize: number, fontFamily: string, fontWeight: number | string, wordLimit?: number): void;
386
+ declare function totalWordCount(layout: LineLayout[]): number;
387
+ declare function totalLineCount(layout: LineLayout[]): number;
388
+ declare function totalCharCount(layout: LineLayout[]): number;
389
+
390
+ type RenderFrame = {
391
+ canvas: Canvas;
392
+ layout: LineLayout[];
393
+ fontSize: number;
394
+ totalWords: number;
395
+ };
396
+ declare function renderFrame(cfg: NormalizedBratConfig, wordLimit?: number): RenderFrame;
397
+ declare function renderAnimationFrame(cfg: NormalizedBratConfig, layout: LineLayout[], fontSize: number, wordLimit: number): Canvas;
398
+
399
+ type AnimationStep = {
400
+ wordLimit: number;
401
+ lineLimit?: number;
402
+ charLimit?: number;
403
+ };
404
+ declare function buildSteps(layout: LineLayout[], mode: AnimationMode, direction: AnimationDirection): number[];
405
+
406
+ declare function exportImage(cfg: NormalizedBratConfig): Promise<BratResult>;
407
+
408
+ declare function exportGif(cfg: NormalizedBratConfig): Promise<BratResult>;
409
+
410
+ declare function exportVideo(cfg: NormalizedBratConfig): Promise<BratResult>;
411
+
412
+ type StickerTextOptions = {
413
+ top?: string;
414
+ bottom?: string;
415
+ fontSize?: number;
416
+ fontFamily?: string;
417
+ color?: string;
418
+ strokeColor?: string;
419
+ strokeWidth?: number;
420
+ };
421
+ declare function imageToSticker(source: string | Buffer, opts?: StickerConfig & StickerTextOptions): Promise<Buffer>;
422
+ declare function imagesToSticker(source: string | Buffer, dest: string, opts?: StickerConfig & StickerTextOptions): Promise<void>;
423
+ declare function mp4ToGif(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
424
+ declare function gifToMp4(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
425
+ declare function gifToWebm(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
426
+ declare function convertImage(source: string | Buffer, outputFormat: "png" | "jpg" | "webp", dest?: string): Promise<Buffer>;
427
+
428
+ declare class BratGenerator {
429
+ generate(cfg: BratConfig): Promise<BratResult>;
430
+ generateImage(cfg: BratConfig, format?: "png" | "jpg" | "webp"): Promise<BratResult>;
431
+ generateGif(cfg: BratConfig): Promise<BratResult>;
432
+ generateVideo(cfg: BratConfig, format?: "mp4" | "webm"): Promise<BratResult>;
433
+ withPreset(preset: StylePreset, cfg: BratConfig): BratConfig;
434
+ imageToSticker(source: string | Buffer, opts?: StickerConfig & StickerTextOptions): Promise<Buffer>;
435
+ saveSticker(source: string | Buffer, dest: string, opts?: StickerConfig & StickerTextOptions): Promise<void>;
436
+ mp4ToGif(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
437
+ gifToMp4(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
438
+ gifToWebm(input: string, output: string, opts?: ConvertOptions): Promise<Buffer>;
439
+ convertImage(source: string | Buffer, format: "png" | "jpg" | "webp", dest?: string): Promise<Buffer>;
440
+ }
441
+ declare const bratGenerator: BratGenerator;
442
+ declare function generateBrat(cfg: BratConfig): Promise<BratResult>;
443
+
444
+ type MonthlyPoint = {
445
+ label: string;
446
+ group: number;
447
+ user: number;
448
+ };
449
+ type WeeklyPoint = {
450
+ label: string;
451
+ group: number;
452
+ user: number;
453
+ };
454
+ type AnalyticsTheme = {
455
+ background: string;
456
+ surface: string;
457
+ ink: string;
458
+ mutedInk: string;
459
+ groupLine: string;
460
+ userLine: string;
461
+ groupFill: string;
462
+ userFill: string;
463
+ grid: string;
464
+ accent: string;
465
+ };
466
+ type MonthlyChartStyle = "smooth-line" | "area" | "grouped-bars";
467
+ type WeeklyChartStyle = "bubbles" | "stacked-bars" | "radial-bars" | "mini-columns";
468
+ type AnalyticsChartVariant = "poster" | "dashboard" | "minimal" | "neon" | "compact";
469
+ declare const ANALYTICS_CHART_MODEL_NAMES: readonly ["vintage-poster", "modern-dashboard", "minimal-report", "dark-neon", "compact-card"];
470
+ type AnalyticsChartModelName = (typeof ANALYTICS_CHART_MODEL_NAMES)[number];
471
+ type AnalyticsChartModel = {
472
+ id: string;
473
+ label?: string;
474
+ variant?: AnalyticsChartVariant;
475
+ monthlyChart?: MonthlyChartStyle;
476
+ weeklyChart?: WeeklyChartStyle;
477
+ showAnnotations?: boolean;
478
+ showLegend?: boolean;
479
+ showTexture?: boolean;
480
+ theme?: Partial<AnalyticsTheme>;
481
+ };
482
+ type AnalyticsImageOptions = {
483
+ title?: string;
484
+ subtitle?: string;
485
+ monthly?: readonly MonthlyPoint[];
486
+ weekly?: readonly WeeklyPoint[];
487
+ output?: string;
488
+ width?: number;
489
+ height?: number;
490
+ footer?: string;
491
+ theme?: Partial<AnalyticsTheme>;
492
+ model?: AnalyticsChartModelName | AnalyticsChartModel;
493
+ modelOverrides?: Partial<AnalyticsChartModel>;
494
+ };
495
+ declare const ANALYTICS_CHART_MODELS: Record<AnalyticsChartModelName, AnalyticsChartModel>;
496
+ declare const demoAnalyticsData: {
497
+ monthly: {
498
+ label: string;
499
+ group: number;
500
+ user: number;
501
+ }[];
502
+ weekly: {
503
+ label: string;
504
+ group: number;
505
+ user: number;
506
+ }[];
507
+ };
508
+ declare function getAnalyticsChartModels(): AnalyticsChartModel[];
509
+ declare function generateChartImage(options: AnalyticsImageOptions): Promise<Buffer>;
510
+ declare function generateAnalyticsStatsImage(options?: AnalyticsImageOptions): Promise<Buffer>;
511
+ declare class ChartGenerator {
512
+ generateAnalyticsStatsImage(options?: AnalyticsImageOptions): Promise<Buffer>;
513
+ generateStatsImage(options?: AnalyticsImageOptions): Promise<Buffer>;
514
+ getModels(): AnalyticsChartModel[];
515
+ }
516
+ declare const chartGenerator: ChartGenerator;
517
+
518
+ interface InstagramScraperOptions extends ScraperOptions {
519
+ credentials?: {
520
+ cookie?: string;
521
+ csrfToken?: string;
522
+ };
523
+ }
524
+ interface InstagramProfile {
525
+ id: string;
526
+ username: string;
527
+ fullName: string;
528
+ biography: string;
529
+ profilePicUrl: string;
530
+ profilePicUrlHd: string | null;
531
+ followersCount: number;
532
+ followingCount: number;
533
+ mediaCount: number;
534
+ isPrivate: boolean;
535
+ isVerified: boolean;
536
+ externalUrl: string | null;
537
+ }
538
+ interface InstagramCarouselItem {
539
+ id: string;
540
+ mediaType: number;
541
+ thumbnailUrl: string | null;
542
+ videoUrl: string | null;
543
+ }
544
+ interface InstagramMediaItem {
545
+ id: string;
546
+ shortcode: string;
547
+ mediaType: number;
548
+ productType: string | null;
549
+ caption: string | null;
550
+ takenAt: number | null;
551
+ likeCount: number | null;
552
+ commentCount: number | null;
553
+ thumbnailUrl: string | null;
554
+ videoUrl: string | null;
555
+ carousel: InstagramCarouselItem[] | null;
556
+ }
557
+ interface InstagramFeed {
558
+ items: InstagramMediaItem[];
559
+ nextMaxId: string | null;
560
+ hasMore: boolean;
561
+ }
562
+ interface InstagramProfileWithFeed {
563
+ profile: InstagramProfile;
564
+ items: InstagramMediaItem[];
565
+ nextMaxId: string | null;
566
+ hasMore: boolean;
567
+ }
568
+ interface InstagramDownloadAsset {
569
+ url: string;
570
+ outputPath: string;
571
+ type: "image" | "video";
572
+ index: number;
573
+ }
574
+ interface InstagramDownloadResult {
575
+ sourceUrl: string;
576
+ outputDir: string;
577
+ metadataPath: string | null;
578
+ assets: InstagramDownloadAsset[];
579
+ }
580
+ interface InstagramFeedOptions {
581
+ count?: number;
582
+ maxId?: string;
583
+ }
584
+ interface InstagramDownloadPostInput {
585
+ postUrl?: string;
586
+ shortcode?: string;
587
+ media?: InstagramMediaItem;
588
+ outputDir: string;
589
+ includeMetadata?: boolean;
590
+ }
591
+ interface InstagramDownloadProfileInput {
592
+ usernameOrUrl: string;
593
+ outputDir: string;
594
+ feedCount?: number;
595
+ includeProfilePicture?: boolean;
596
+ includeInitialPosts?: boolean;
597
+ includeMetadata?: boolean;
598
+ }
599
+
600
+ declare class InstagramScraper {
601
+ #private;
602
+ constructor(options?: ScraperOptions);
603
+ enableLogs(): this;
604
+ disableLogs(): this;
605
+ getProfile(username: string): Promise<WsperResponse<InstagramProfile>>;
606
+ getFeed(username: string, options?: InstagramFeedOptions): Promise<WsperResponse<InstagramFeed>>;
607
+ getPost(input: string): Promise<WsperResponse<InstagramMediaItem>>;
608
+ getProfileWithFeed(username: string, options?: InstagramFeedOptions): Promise<WsperResponse<InstagramProfileWithFeed>>;
609
+ downloadPost(input: InstagramDownloadPostInput): Promise<WsperResponse<InstagramDownloadResult>>;
610
+ downloadProfile(input: InstagramDownloadProfileInput): Promise<WsperResponse<InstagramDownloadResult>>;
611
+ }
612
+
613
+ interface AlkitabScraperOptions extends ScraperOptions {
614
+ baseUrl?: string | undefined;
615
+ }
616
+ interface AlkitabVerse {
617
+ title: string;
618
+ text: string;
619
+ link: string;
620
+ }
621
+
622
+ declare class AlkitabScraper {
623
+ #private;
624
+ constructor(options?: AlkitabScraperOptions);
625
+ enableLogs(): this;
626
+ disableLogs(): this;
627
+ search(query: string): Promise<WsperResponse<AlkitabVerse[]>>;
628
+ }
629
+
630
+ declare function parseAlkitabSearchHtml(html: string, pageUrl: string): AlkitabVerse[];
631
+
632
+ interface AnimeQuoteScraperOptions extends ScraperOptions {
633
+ baseUrl?: string | undefined;
634
+ }
635
+ interface AnimeQuoteItem {
636
+ character: string;
637
+ anime: string;
638
+ episode: string;
639
+ quote: string;
640
+ }
641
+
642
+ declare class AnimeQuoteScraper {
643
+ #private;
644
+ constructor(options?: AnimeQuoteScraperOptions);
645
+ getRandom(): Promise<WsperResponse<AnimeQuoteItem>>;
646
+ }
647
+
648
+ declare function parseAnimeQuoteFeedHtml(html: string, pageUrl: string): string[];
649
+ declare function parseAnimeQuoteDetailHtml(html: string, pageUrl: string): AnimeQuoteItem;
650
+
651
+ interface AnimeRandomScraperOptions extends ScraperOptions {
652
+ baseUrl?: string | undefined;
653
+ }
654
+ interface AnimeRandomResult {
655
+ character: string;
656
+ imageUrl: string;
657
+ }
658
+
659
+ declare const ANIME_CHARACTERS: readonly ["akira", "akiyama", "anna", "asuna", "ayuzawa", "boruto", "chitanda", "chitoge", "deidara", "doraemon", "emilia", "erza", "gremory", "hestia", "hinata", "inori", "isuzu", "itachi", "itori", "kaga", "kagura", "kakasih", "kaori", "kaneki", "kosaki", "kotori", "kuriyama", "kuroha", "kurumi", "madara", "mikasa", "miku", "minato", "naruto", "natsukawa", "neko", "nekohime", "nezuko", "nishimiya", "onepiece", "pokemon", "rem", "rize", "sagiri", "sakura", "sasuke", "shina", "shinka", "shizuka", "shota", "tomori", "toukachan", "tsunade", "yatogami", "yuki"];
660
+ type AnimeCharacter = typeof ANIME_CHARACTERS[number];
661
+ declare class AnimeRandomScraper {
662
+ #private;
663
+ constructor(options?: AnimeRandomScraperOptions);
664
+ getImage(character: string): Promise<WsperResponse<AnimeRandomResult>>;
665
+ random(): Promise<WsperResponse<AnimeRandomResult>>;
666
+ }
667
+
668
+ interface BiliBiliScraperOptions extends ScraperOptions {
669
+ apiBaseUrl?: string | undefined;
670
+ cookie?: string | undefined;
671
+ }
672
+ interface BiliBiliVideoStream {
673
+ quality: string;
674
+ qualityId: number;
675
+ videoUrl: string;
676
+ audioUrl: string;
677
+ }
678
+ interface BiliBiliVideoInfo {
679
+ aid: number;
680
+ bvid: string;
681
+ title: string;
682
+ description: string;
683
+ cover: string;
684
+ duration: number;
685
+ author: string;
686
+ authorUid: number;
687
+ views: number;
688
+ likes: number;
689
+ cid: number;
690
+ url: string;
691
+ streams: BiliBiliVideoStream[];
692
+ }
693
+ interface BiliBiliSearchItem {
694
+ aid: number;
695
+ bvid: string;
696
+ title: string;
697
+ description: string;
698
+ cover: string;
699
+ author: string;
700
+ views: number;
701
+ duration: string;
702
+ url: string;
703
+ }
704
+ interface BiliBiliSearchResult {
705
+ query: string;
706
+ total: number;
707
+ page: number;
708
+ items: BiliBiliSearchItem[];
709
+ }
710
+
711
+ declare class BiliBiliScraper {
712
+ #private;
713
+ constructor(options?: BiliBiliScraperOptions);
714
+ search(query: string, page?: number): Promise<WsperResponse<BiliBiliSearchResult>>;
715
+ getVideoInfo(input: string): Promise<WsperResponse<BiliBiliVideoInfo>>;
716
+ }
717
+
718
+ declare function parseBiliBiliViewResponse(raw: unknown): BiliBiliVideoInfo;
719
+ declare function parseBiliBiliPlayUrlResponse(raw: unknown): BiliBiliVideoStream[];
720
+ declare function parseBiliBiliSearchResponse(raw: unknown, query: string, page: number): BiliBiliSearchResult;
721
+
722
+ interface BMKGBaseUrls {
723
+ nowcasting: string;
724
+ autogempa: string;
725
+ gempaDirasakan: string;
726
+ shakemap: string;
727
+ prakiraan: string;
728
+ }
729
+ interface BMKGScraperOptions extends ScraperOptions {
730
+ baseUrls?: Partial<BMKGBaseUrls> | undefined;
731
+ downloadDir?: string | undefined;
732
+ }
733
+ interface BMKGNowcasting {
734
+ raw: Record<string, unknown>;
735
+ features: unknown[];
736
+ totalFeatures: number;
737
+ retrievedAt: string;
738
+ }
739
+ interface BMKGEarthquake {
740
+ tanggal: string;
741
+ jam: string;
742
+ datetime: string;
743
+ coordinates: string;
744
+ lintang: string;
745
+ bujur: string;
746
+ magnitude: string;
747
+ kedalaman: string;
748
+ wilayah: string;
749
+ potensi: string | null;
750
+ dirasakan: string | null;
751
+ shakemap: string | null;
752
+ }
753
+ interface BMKGEarthquakeFeed {
754
+ raw: Record<string, unknown>;
755
+ earthquakes: BMKGEarthquake[];
756
+ totalEarthquakes: number;
757
+ retrievedAt: string;
758
+ }
759
+ interface BMKGForecast {
760
+ provinceCode: string;
761
+ provinceName: string | null;
762
+ xml: string;
763
+ retrievedAt: string;
764
+ }
765
+ interface BMKGShakemapDownload {
766
+ filename: string;
767
+ outputPath: string;
768
+ sizeBytes: number;
769
+ url: string;
770
+ contentType: string | null;
771
+ durationMs: number;
772
+ downloadedAt: string;
773
+ }
774
+
775
+ declare class BMKGScraper {
776
+ #private;
777
+ constructor(options?: BMKGScraperOptions);
778
+ enableLogs(): this;
779
+ disableLogs(): this;
780
+ getCuacaNowcasting(offset?: number, limit?: number): Promise<WsperResponse<BMKGNowcasting>>;
781
+ getAutogempa(): Promise<WsperResponse<BMKGEarthquakeFeed>>;
782
+ getGempaDirasakan(): Promise<WsperResponse<BMKGEarthquakeFeed>>;
783
+ getPrakiraanCuaca(provinsi: string): Promise<WsperResponse<BMKGForecast>>;
784
+ downloadShakemap(kodeShakemap: string, saveDir?: string): Promise<WsperResponse<BMKGShakemapDownload>>;
785
+ getKodeProvinsi(): WsperResponse<Record<string, string>>;
786
+ }
787
+
788
+ declare const BMKG_DEFAULT_BASE_URLS: BMKGBaseUrls;
789
+ declare const BMKG_QUEUE_DEFAULTS: {
790
+ concurrency: number;
791
+ intervalMs: number;
792
+ intervalCap: number;
793
+ minDelayMs: number;
794
+ maxDelayMs: number;
795
+ };
796
+ declare const BMKG_PROVINCE_CODES: Record<string, string>;
797
+
798
+ declare function parseBMKGNowcasting(raw: unknown, retrievedAt?: string): BMKGNowcasting;
799
+ declare function parseBMKGEarthquakeFeed(raw: unknown, retrievedAt?: string): BMKGEarthquakeFeed;
800
+ declare function parseBMKGForecastXml(raw: unknown, provinceCode: string, provinceName: string | null, retrievedAt?: string): BMKGForecast;
801
+
802
+ interface CapCutScraperOptions extends ScraperOptions {
803
+ resolverUrl?: string | undefined;
804
+ }
805
+ interface CapCutDownloadResult {
806
+ videoUrl: string;
807
+ }
808
+
809
+ declare class CapCutScraper {
810
+ #private;
811
+ constructor(options?: CapCutScraperOptions);
812
+ download(url: string): Promise<WsperResponse<CapCutDownloadResult>>;
813
+ }
814
+
815
+ declare function parseCapCutResolverResponse(raw: unknown): string;
816
+
817
+ interface CuacaBaseUrls {
818
+ search: string;
819
+ weatherByCoord: string;
820
+ warning: string;
821
+ }
822
+ interface CuacaScraperOptions extends ScraperOptions {
823
+ baseUrls?: Partial<CuacaBaseUrls> | undefined;
824
+ warningApiKey?: string | undefined;
825
+ }
826
+ interface CuacaSearchResult {
827
+ adm4: string;
828
+ name: string;
829
+ lat: number;
830
+ lon: number;
831
+ }
832
+ interface CuacaResult {
833
+ location: string;
834
+ localTime: string;
835
+ weather: string;
836
+ temperature: string;
837
+ humidity: string;
838
+ cloudCover: string;
839
+ visibility: string;
840
+ wind: string;
841
+ impact: string;
842
+ warning: string;
843
+ bmkgUrl: string;
844
+ gmapUrl: string;
845
+ lat: number;
846
+ lon: number;
847
+ }
848
+ interface CuacaWarningInfo {
849
+ impact: string;
850
+ warning: string;
851
+ }
852
+
853
+ declare class CuacaScraper {
854
+ #private;
855
+ constructor(options?: CuacaScraperOptions);
856
+ enableLogs(): this;
857
+ disableLogs(): this;
858
+ getWeather(lokasi: string): Promise<WsperResponse<CuacaResult>>;
859
+ searchLocation(query: string): Promise<WsperResponse<CuacaSearchResult[]>>;
860
+ getWeatherByCoord(lat: number, lon: number): Promise<WsperResponse<CuacaResult>>;
861
+ }
862
+
863
+ declare const CUACA_DEFAULT_BASE_URLS: {
864
+ search: string;
865
+ weatherByCoord: string;
866
+ warning: string;
867
+ };
868
+ declare const CUACA_QUEUE_DEFAULTS: {
869
+ concurrency: number;
870
+ intervalMs: number;
871
+ intervalCap: number;
872
+ minDelayMs: number;
873
+ maxDelayMs: number;
874
+ };
875
+ declare const CUACA_WIND_DIRECTIONS: Record<string, string>;
876
+ declare const CUACA_CITY_COORDS: Record<string, {
877
+ lat: number;
878
+ lon: number;
879
+ }>;
880
+
881
+ declare function parseCuacaSearchLocations(raw: unknown, fallbackName: string): CuacaSearchResult[];
882
+ declare function parseCuacaWeather(raw: unknown, lat: number, lon: number, warning: CuacaWarningInfo): CuacaResult;
883
+ declare function parseCuacaWarning(raw: unknown): CuacaWarningInfo;
884
+ declare function defaultWarning(): CuacaWarningInfo;
885
+
886
+ interface DrakorScraperOptions extends ScraperOptions {
887
+ baseUrl?: string | undefined;
888
+ }
889
+ interface DrakorGenre {
890
+ name: string;
891
+ url: string;
892
+ }
893
+ interface DrakorArtist {
894
+ name: string;
895
+ url: string;
896
+ }
897
+ interface DrakorItem {
898
+ title: string;
899
+ url: string;
900
+ image: string;
901
+ type: string;
902
+ duration: string | null;
903
+ quality: string | null;
904
+ rating: string | null;
905
+ slug: string;
906
+ }
907
+ interface DrakorEpisode {
908
+ title: string;
909
+ url: string;
910
+ episode: string;
911
+ date: string;
912
+ }
913
+ interface DrakorDetail {
914
+ title: string;
915
+ koreanTitle: string | null;
916
+ image: string | null;
917
+ synopsis: string;
918
+ rating: string;
919
+ type: string;
920
+ status: string;
921
+ episodeCount: string | null;
922
+ season: string | null;
923
+ firstAirDate: string | null;
924
+ country: string | null;
925
+ director: string | null;
926
+ videoLength: string | null;
927
+ views: string | null;
928
+ postedOn: string | null;
929
+ genres: DrakorGenre[];
930
+ artists: DrakorArtist[];
931
+ episodes: DrakorEpisode[];
932
+ }
933
+ interface DrakorPagination {
934
+ currentPage: number;
935
+ hasNext: boolean;
936
+ hasPrev: boolean;
937
+ }
938
+ interface DrakorList {
939
+ dramas: DrakorItem[];
940
+ pagination: DrakorPagination;
941
+ }
942
+
943
+ declare class DrakorScraper {
944
+ #private;
945
+ constructor(options?: DrakorScraperOptions);
946
+ enableLogs(): this;
947
+ disableLogs(): this;
948
+ search(query: string): Promise<WsperResponse<DrakorList>>;
949
+ detail(slug: string): Promise<WsperResponse<DrakorDetail>>;
950
+ ongoing(): Promise<WsperResponse<DrakorList>>;
951
+ getAll(page?: number): Promise<WsperResponse<DrakorList>>;
952
+ }
953
+
954
+ declare function parseDrakorListHtml(html: string, pageUrl: string, currentPage: number): DrakorList;
955
+ declare function parseDrakorDetailHtml(html: string, pageUrl: string): DrakorDetail;
956
+
957
+ interface DramaboxScraperOptions extends ScraperOptions {
958
+ baseUrl?: string | undefined;
959
+ }
960
+ interface DramaboxListItem {
961
+ id: string;
962
+ title: string;
963
+ episodes: number;
964
+ description: string;
965
+ cover: string;
966
+ playUrl: string;
967
+ }
968
+ interface DramaboxResult {
969
+ query: string;
970
+ total: number;
971
+ results: DramaboxListItem[];
972
+ }
973
+
974
+ declare class DramaboxScraper {
975
+ #private;
976
+ constructor(options?: DramaboxScraperOptions);
977
+ enableLogs(): this;
978
+ disableLogs(): this;
979
+ search(query: string): Promise<WsperResponse<DramaboxResult>>;
980
+ }
981
+
982
+ declare function parseDramaboxSearchHtml(html: string, pageUrl: string, query: string): DramaboxResult;
983
+
984
+ interface FaceswapScraperOptions {
985
+ baseUrl?: string | undefined;
986
+ maxImageSizeBytes?: number | undefined;
987
+ maxPollAttempts?: number | undefined;
988
+ pollIntervalMs?: number | undefined;
989
+ debug?: boolean | undefined;
990
+ http?: HttpOptions | undefined;
991
+ queue?: QueueOptions | undefined;
992
+ }
993
+ interface FaceswapResult {
994
+ job_id: string;
995
+ image: string;
996
+ }
997
+
998
+ declare class FaceswapScraper {
999
+ #private;
1000
+ constructor(options?: FaceswapScraperOptions);
1001
+ enableLogs(): this;
1002
+ disableLogs(): this;
1003
+ process(sourceBuffer: Buffer, targetBuffer: Buffer): Promise<WsperResponse<FaceswapResult>>;
1004
+ }
1005
+
1006
+ declare function parseFaceswapCreateResponse(input: unknown): string;
1007
+ declare function parseFaceswapPollResponse(input: unknown, jobId: string): FaceswapResult | null;
1008
+
1009
+ interface HokInfoScraperOptions extends ScraperOptions {
1010
+ baseUrl?: string | undefined;
1011
+ }
1012
+ interface HokInfoResult {
1013
+ title: string;
1014
+ image: string | null;
1015
+ profile: Record<string, string>;
1016
+ bio: string | null;
1017
+ skills: string[];
1018
+ lore: string | null;
1019
+ url: string;
1020
+ }
1021
+
1022
+ declare class HokInfoScraper {
1023
+ #private;
1024
+ constructor(options?: HokInfoScraperOptions);
1025
+ enableLogs(): this;
1026
+ disableLogs(): this;
1027
+ getCharacter(name: string): Promise<WsperResponse<HokInfoResult>>;
1028
+ }
1029
+
1030
+ declare function parseHokInfoHtml(html: string, pageUrl: string): HokInfoResult;
1031
+
1032
+ type HtmlToJpgPageSize = "auto" | "A4" | "A3" | "Letter";
1033
+ type HtmlToJpgPageOrientation = "portrait" | "landscape";
1034
+ interface HtmlToJpgScraperOptions {
1035
+ baseUrl?: string | undefined;
1036
+ maxFileSizeBytes?: number | undefined;
1037
+ maxPollAttempts?: number | undefined;
1038
+ pollIntervalMs?: number | undefined;
1039
+ viewportWidth?: number | undefined;
1040
+ pageSize?: HtmlToJpgPageSize | undefined;
1041
+ pageOrientation?: HtmlToJpgPageOrientation | undefined;
1042
+ margin?: number | undefined;
1043
+ initialDelaySeconds?: number | undefined;
1044
+ hideCookie?: boolean | undefined;
1045
+ debug?: boolean | undefined;
1046
+ http?: HttpOptions | undefined;
1047
+ queue?: QueueOptions | undefined;
1048
+ }
1049
+ interface HtmlToJpgUploadForm {
1050
+ jobId: string;
1051
+ uploadUrl: string;
1052
+ uploadParams: Record<string, string>;
1053
+ }
1054
+ interface HtmlToJpgResult {
1055
+ jobId: string;
1056
+ downloadUrl: string;
1057
+ }
1058
+ interface HtmlToJpgTask {
1059
+ name: string;
1060
+ status: string | null;
1061
+ result: {
1062
+ form?: {
1063
+ url: string;
1064
+ parameters: Record<string, string>;
1065
+ };
1066
+ files?: Array<{
1067
+ url: string;
1068
+ }>;
1069
+ url?: string;
1070
+ } | null;
1071
+ }
1072
+
1073
+ declare class HtmlToJpgScraper {
1074
+ #private;
1075
+ constructor(options?: HtmlToJpgScraperOptions);
1076
+ enableLogs(): this;
1077
+ disableLogs(): this;
1078
+ convert(filePath: string): Promise<WsperResponse<HtmlToJpgResult>>;
1079
+ convertBuffer(htmlBuffer: Buffer, filename?: string, startedAt?: number): Promise<WsperResponse<HtmlToJpgResult>>;
1080
+ }
1081
+
1082
+ declare function parseHtmlToJpgCreateJobResponse(input: unknown): HtmlToJpgUploadForm;
1083
+ declare function parseHtmlToJpgTasks(input: unknown): HtmlToJpgTask[];
1084
+ declare function getHtmlToJpgDownloadUrl(tasks: HtmlToJpgTask[]): string | null;
1085
+
1086
+ interface IkiruMangaScraperOptions extends ScraperOptions {
1087
+ baseUrl?: string | undefined;
1088
+ }
1089
+ interface IkiruMangaItem {
1090
+ title: string;
1091
+ link: string;
1092
+ type: string;
1093
+ cover: string | null;
1094
+ }
1095
+ interface IkiruMangaResult {
1096
+ items: IkiruMangaItem[];
1097
+ }
1098
+
1099
+ declare class IkiruMangaScraper {
1100
+ #private;
1101
+ constructor(options?: IkiruMangaScraperOptions);
1102
+ enableLogs(): this;
1103
+ disableLogs(): this;
1104
+ search(query: string): Promise<WsperResponse<IkiruMangaResult>>;
1105
+ }
1106
+
1107
+ declare function parseIkiruMangaSearchHtml(html: string, pageUrl: string): IkiruMangaResult;
1108
+
1109
+ type ImageSiteName = "safebooru";
1110
+ interface ImageScraperOptions {
1111
+ safebooruBaseUrl?: string | undefined;
1112
+ debug?: boolean | undefined;
1113
+ http?: HttpOptions | undefined;
1114
+ queue?: QueueOptions | undefined;
1115
+ }
1116
+ interface ImageSearchOptions {
1117
+ tags: string;
1118
+ page?: number | undefined;
1119
+ limit?: number | undefined;
1120
+ }
1121
+ interface ImagePost {
1122
+ id: number;
1123
+ thumbnail: string | null;
1124
+ contentUrl: string | null;
1125
+ sampleUrl: string | null;
1126
+ score: number | null;
1127
+ uploader: string | null;
1128
+ tags: string[];
1129
+ rating: string | null;
1130
+ md5: string | null;
1131
+ width: number | null;
1132
+ height: number | null;
1133
+ sourceUrl: string | null;
1134
+ createdAt: string | null;
1135
+ }
1136
+ interface ImageSearchResult {
1137
+ site: ImageSiteName;
1138
+ posts: ImagePost[];
1139
+ total: number | null;
1140
+ page: number;
1141
+ limit: number;
1142
+ }
1143
+
1144
+ declare class ImageScraper {
1145
+ #private;
1146
+ constructor(options?: ImageScraperOptions);
1147
+ enableLogs(): this;
1148
+ disableLogs(): this;
1149
+ search(site: ImageSiteName, options: ImageSearchOptions): Promise<WsperResponse<ImageSearchResult>>;
1150
+ safebooru(tags: string, page?: number, limit?: number): Promise<WsperResponse<ImageSearchResult>>;
1151
+ rule34xxx(): Promise<WsperResponse<ImageSearchResult>>;
1152
+ gelbooru(): Promise<WsperResponse<ImageSearchResult>>;
1153
+ static getSupportedSites(): ImageSiteName[];
1154
+ }
1155
+
1156
+ declare function parseSafebooruSearchResponse(input: unknown, site: ImageSiteName, page: number, limit: number): ImageSearchResult;
1157
+
1158
+ interface ImgUpscalerScraperOptions {
1159
+ baseUrl?: string | undefined;
1160
+ maxImageSizeBytes?: number | undefined;
1161
+ maxPollAttempts?: number | undefined;
1162
+ pollIntervalMs?: number | undefined;
1163
+ debug?: boolean | undefined;
1164
+ http?: HttpOptions | undefined;
1165
+ queue?: QueueOptions | undefined;
1166
+ }
1167
+ type ImgUpscalerScale = 2 | 4;
1168
+ interface ImgUpscalerResult {
1169
+ originalPath: string | null;
1170
+ outputPath: string | null;
1171
+ resultUrl: string;
1172
+ scale: ImgUpscalerScale;
1173
+ }
1174
+
1175
+ declare class ImgUpscalerScraper {
1176
+ #private;
1177
+ constructor(options?: ImgUpscalerScraperOptions);
1178
+ enableLogs(): this;
1179
+ disableLogs(): this;
1180
+ upscale(inputPath: string, scale?: ImgUpscalerScale): Promise<WsperResponse<ImgUpscalerResult>>;
1181
+ upscaleBuffer(imageBuffer: Buffer, filename?: string, scale?: ImgUpscalerScale, originalPath?: string | null, startedAt?: number): Promise<WsperResponse<ImgUpscalerResult>>;
1182
+ }
1183
+
1184
+ declare function parseImgUpscalerUploadResponse(input: unknown): string;
1185
+ declare function parseImgUpscalerStatusResponse(input: unknown): string | null;
1186
+
1187
+ interface KomikindoScraperOptions extends ScraperOptions {
1188
+ baseUrl?: string | undefined;
1189
+ }
1190
+ interface KomikindoSearchItem {
1191
+ title: string;
1192
+ imageUrl: string | null;
1193
+ rating: string;
1194
+ url: string;
1195
+ }
1196
+ interface KomikindoDetail {
1197
+ title: string;
1198
+ imageUrl: string | null;
1199
+ rating: string;
1200
+ url: string;
1201
+ alternativeTitle: string;
1202
+ status: string;
1203
+ author: string;
1204
+ illustrator: string;
1205
+ graphic: string;
1206
+ theme: string;
1207
+ comicType: string;
1208
+ official: string;
1209
+ information: string;
1210
+ }
1211
+
1212
+ declare class KomikindoScraper {
1213
+ #private;
1214
+ constructor(options?: KomikindoScraperOptions);
1215
+ search(query: string): Promise<WsperResponse<KomikindoSearchItem[]>>;
1216
+ getDetail(url: string): Promise<WsperResponse<KomikindoDetail>>;
1217
+ }
1218
+
1219
+ declare function parseKomikindoSearchHtml(html: string): KomikindoSearchItem[];
1220
+ declare function parseKomikindoDetailHtml(html: string, pageUrl: string): KomikindoDetail;
1221
+
1222
+ interface LyricsScraperOptions extends ScraperOptions {
1223
+ baseUrl?: string | undefined;
1224
+ }
1225
+ interface LyricsResult {
1226
+ lyrics: string;
1227
+ link: string;
1228
+ title: string;
1229
+ }
1230
+
1231
+ declare class LyricsScraper {
1232
+ #private;
1233
+ constructor(options?: LyricsScraperOptions);
1234
+ search(query: string): Promise<WsperResponse<LyricsResult>>;
1235
+ }
1236
+
1237
+ declare function parseLyricsSearchHtml(html: string, pageUrl: string): string;
1238
+ declare function parseLyricsDetailHtml(html: string, pageUrl: string): LyricsResult;
1239
+
1240
+ interface MConverterScraperOptions {
1241
+ baseUrl?: string | undefined;
1242
+ maxFileSizeBytes?: number | undefined;
1243
+ chunkSizeBytes?: number | undefined;
1244
+ maxPollAttempts?: number | undefined;
1245
+ pollIntervalMs?: number | undefined;
1246
+ debug?: boolean | undefined;
1247
+ http?: HttpOptions | undefined;
1248
+ queue?: QueueOptions | undefined;
1249
+ }
1250
+ interface MConverterTarget {
1251
+ name: string;
1252
+ mime: string;
1253
+ }
1254
+ interface MConverterTargetsResult {
1255
+ targets: MConverterTarget[];
1256
+ }
1257
+ interface MConverterConvertResult {
1258
+ url: string;
1259
+ }
1260
+
1261
+ declare class MConverterScraper {
1262
+ #private;
1263
+ constructor(options?: MConverterScraperOptions);
1264
+ enableLogs(): this;
1265
+ disableLogs(): this;
1266
+ getTargets(filename: string): Promise<WsperResponse<MConverterTargetsResult>>;
1267
+ convert(inputPath: string, targetFormat: string): Promise<WsperResponse<MConverterConvertResult>>;
1268
+ convertBuffer(buffer: Buffer, filename: string, targetFormat: string, startedAt?: number): Promise<WsperResponse<MConverterConvertResult>>;
1269
+ }
1270
+
1271
+ interface MConverterUploadState {
1272
+ token: string;
1273
+ awaitingChunks: boolean;
1274
+ }
1275
+ interface MConverterPollState {
1276
+ status: "pending" | "finished" | "error";
1277
+ reason: string | null;
1278
+ }
1279
+ declare function parseMConverterTargets(input: unknown): MConverterTarget[];
1280
+ declare function parseMConverterUploadResponse(input: unknown): MConverterUploadState;
1281
+ declare function parseMConverterPollResponse(input: unknown): MConverterPollState;
1282
+
1283
+ interface McAddonScraperOptions extends ScraperOptions {
1284
+ baseUrl?: string | undefined;
1285
+ }
1286
+ interface McAddonSearchItem {
1287
+ title: string;
1288
+ url: string;
1289
+ description: string;
1290
+ rating: string;
1291
+ tags: string[];
1292
+ }
1293
+ interface McAddonDetail {
1294
+ image: string | null;
1295
+ title: string;
1296
+ subtitle: string;
1297
+ gameplay: string;
1298
+ }
1299
+ interface McAddonResult {
1300
+ info: McAddonSearchItem;
1301
+ detail: McAddonDetail;
1302
+ }
1303
+
1304
+ declare class McAddonScraper {
1305
+ #private;
1306
+ constructor(options?: McAddonScraperOptions);
1307
+ search(query: string): Promise<WsperResponse<McAddonSearchItem[]>>;
1308
+ getDetail(url: string): Promise<WsperResponse<McAddonDetail>>;
1309
+ getAddon(query: string): Promise<WsperResponse<McAddonResult>>;
1310
+ }
1311
+
1312
+ declare function parseMcAddonSearchHtml(html: string): McAddonSearchItem[];
1313
+ declare function parseMcAddonDetailHtml(html: string): McAddonDetail;
1314
+
1315
+ interface ModAndroidScraperOptions {
1316
+ android1BaseUrl?: string | undefined;
1317
+ modyoloBaseUrl?: string | undefined;
1318
+ aptoideBaseUrl?: string | undefined;
1319
+ uptodownBaseUrl?: string | undefined;
1320
+ debug?: boolean | undefined;
1321
+ http?: HttpOptions | undefined;
1322
+ queue?: QueueOptions | undefined;
1323
+ }
1324
+ interface Android1Item {
1325
+ judul: string;
1326
+ dev: string;
1327
+ rating: string;
1328
+ thumb: string;
1329
+ link: string;
1330
+ }
1331
+ interface Android1Result {
1332
+ data: Android1Item[];
1333
+ }
1334
+ interface ModyoloItem {
1335
+ judul: string;
1336
+ link: string;
1337
+ thumb: string;
1338
+ versi: string;
1339
+ ukuran: string;
1340
+ }
1341
+ interface ModyoloResult {
1342
+ data: ModyoloItem[];
1343
+ }
1344
+ interface AptoideItem {
1345
+ judul: string;
1346
+ dev: string;
1347
+ rating: string;
1348
+ ukuran: string;
1349
+ thumb: string;
1350
+ link: string;
1351
+ }
1352
+ interface AptoideResult {
1353
+ data: AptoideItem[];
1354
+ }
1355
+ interface UptodownItem {
1356
+ judul: string;
1357
+ dev: string;
1358
+ rating: string;
1359
+ thumb: string;
1360
+ link: string;
1361
+ }
1362
+ interface UptodownResult {
1363
+ data: UptodownItem[];
1364
+ }
1365
+ interface ModAndroidSearchResult {
1366
+ android1: Android1Result;
1367
+ modyolo: ModyoloResult;
1368
+ aptoide: AptoideResult;
1369
+ uptodown: UptodownResult;
1370
+ }
1371
+
1372
+ declare class ModAndroidScraper {
1373
+ #private;
1374
+ constructor(options?: ModAndroidScraperOptions);
1375
+ enableLogs(): this;
1376
+ disableLogs(): this;
1377
+ android1(query: string): Promise<WsperResponse<Android1Result>>;
1378
+ modyolo(query: string): Promise<WsperResponse<ModyoloResult>>;
1379
+ aptoide(query: string): Promise<WsperResponse<AptoideResult>>;
1380
+ uptodown(query: string): Promise<WsperResponse<UptodownResult>>;
1381
+ searchAll(query: string): Promise<WsperResponse<ModAndroidSearchResult>>;
1382
+ }
1383
+
1384
+ declare function parseAndroid1Results(html: string, baseUrl: string): Android1Item[];
1385
+ declare function parseModyoloResults(html: string, baseUrl: string): ModyoloItem[];
1386
+ declare function parseAptoideResults(input: unknown): AptoideItem[];
1387
+ declare function parseUptodownResults(html: string, baseUrl: string): UptodownItem[];
1388
+
1389
+ interface MediafireScraperOptions extends ScraperOptions {
1390
+ }
1391
+ interface MediafireResult {
1392
+ downloadUrl: string;
1393
+ fileName: string;
1394
+ fileSize: string;
1395
+ fileType: string;
1396
+ }
1397
+
1398
+ declare class MediafireScraper {
1399
+ #private;
1400
+ constructor(options?: MediafireScraperOptions);
1401
+ getLink(url: string): Promise<WsperResponse<MediafireResult>>;
1402
+ }
1403
+
1404
+ declare function parseMediafireHtml(html: string, pageUrl: string): MediafireResult;
1405
+
1406
+ interface OcrScraperOptions extends ScraperOptions {
1407
+ baseUrl?: string | undefined;
1408
+ filename?: string | undefined;
1409
+ language?: string | undefined;
1410
+ pageSegmentationMode?: string | undefined;
1411
+ maxImageSizeBytes?: number | undefined;
1412
+ }
1413
+ interface OcrScanResult {
1414
+ text: string;
1415
+ }
1416
+
1417
+ declare class OcrScraper {
1418
+ #private;
1419
+ constructor(options?: OcrScraperOptions);
1420
+ enableLogs(): this;
1421
+ disableLogs(): this;
1422
+ scan(imageBuffer: Buffer): Promise<WsperResponse<OcrScanResult>>;
1423
+ }
1424
+
1425
+ declare function parseOcrUploadHtml(html: string, pageUrl: string): string;
1426
+ declare function parseOcrResultHtml(html: string): string;
1427
+
1428
+ interface TopAnimeScraperOptions extends ScraperOptions {
1429
+ baseUrl?: string | undefined;
1430
+ }
1431
+ interface TopAnimeItem {
1432
+ rank: string;
1433
+ title: string;
1434
+ score: string;
1435
+ url: string;
1436
+ type: string;
1437
+ release: string;
1438
+ members: string;
1439
+ }
1440
+
1441
+ declare class TopAnimeScraper {
1442
+ #private;
1443
+ constructor(options?: TopAnimeScraperOptions);
1444
+ getTopAnime(limit?: number): Promise<WsperResponse<TopAnimeItem[]>>;
1445
+ }
1446
+
1447
+ declare function parseTopAnimeHtml(html: string): TopAnimeItem[];
1448
+
1449
+ interface ResepScraperOptions extends ScraperOptions {
1450
+ baseUrl?: string | undefined;
1451
+ }
1452
+ interface ResepItem {
1453
+ name: string;
1454
+ url: string;
1455
+ cookingTime: string;
1456
+ author: string;
1457
+ }
1458
+
1459
+ declare class ResepScraper {
1460
+ #private;
1461
+ constructor(options?: ResepScraperOptions);
1462
+ search(query: string): Promise<WsperResponse<ResepItem[]>>;
1463
+ }
1464
+
1465
+ declare function parseResepSearchHtml(html: string, pageUrl: string): ResepItem[];
1466
+
1467
+ interface SakuraNovelScraperOptions extends ScraperOptions {
1468
+ baseUrl?: string | undefined;
1469
+ }
1470
+ interface SakuraNovelSearchItem {
1471
+ title: string;
1472
+ cover: string;
1473
+ type: string;
1474
+ status: string;
1475
+ url: string;
1476
+ }
1477
+ interface SakuraNovelChapterItem {
1478
+ title: string;
1479
+ url: string;
1480
+ }
1481
+ interface SakuraNovelDetail {
1482
+ title: string;
1483
+ cover: string;
1484
+ synopsis: string;
1485
+ chapters: SakuraNovelChapterItem[];
1486
+ }
1487
+ interface SakuraNovelChapterContent {
1488
+ images: string[];
1489
+ text: string;
1490
+ }
1491
+
1492
+ declare class SakuraNovelScraper {
1493
+ #private;
1494
+ constructor(options?: SakuraNovelScraperOptions);
1495
+ enableLogs(): this;
1496
+ disableLogs(): this;
1497
+ search(query: string): Promise<WsperResponse<SakuraNovelSearchItem[]>>;
1498
+ getDetail(url: string): Promise<WsperResponse<SakuraNovelDetail>>;
1499
+ getChapter(url: string): Promise<WsperResponse<SakuraNovelChapterContent>>;
1500
+ }
1501
+
1502
+ declare function parseSakuraNovelSearchHtml(html: string, pageUrl: string): SakuraNovelSearchItem[];
1503
+ declare function parseSakuraNovelDetailHtml(html: string, pageUrl: string): SakuraNovelDetail;
1504
+ declare function parseSakuraNovelChapterHtml(html: string, pageUrl: string): SakuraNovelChapterContent;
1505
+
1506
+ interface PlayStoreScraperOptions extends ScraperOptions {
1507
+ baseUrl?: string | undefined;
1508
+ }
1509
+ interface PlayStoreApp {
1510
+ name: string;
1511
+ appId: string;
1512
+ url: string;
1513
+ developer: string;
1514
+ ratingText: string;
1515
+ rating: string;
1516
+ developerUrl: string;
1517
+ }
1518
+
1519
+ declare class PlayStoreScraper {
1520
+ #private;
1521
+ constructor(options?: PlayStoreScraperOptions);
1522
+ search(query: string, limit?: number): Promise<WsperResponse<PlayStoreApp[]>>;
1523
+ }
1524
+
1525
+ declare function parsePlayStoreSearchHtml(html: string, pageUrl: string, limit: number): PlayStoreApp[];
1526
+
1527
+ type SpotifyCredentialSource = "default" | "custom";
1528
+ interface SpotifyCredentialsConfig {
1529
+ clientId: string;
1530
+ clientSecret: string;
1531
+ callbackUrl?: string | undefined;
1532
+ market?: string | undefined;
1533
+ }
1534
+ interface ResolvedSpotifyCredentials {
1535
+ clientId: string;
1536
+ clientSecret: string;
1537
+ callbackUrl: string;
1538
+ market: string;
1539
+ source: SpotifyCredentialSource;
1540
+ }
1541
+ interface SpotifyScraperOptions extends ScraperOptions {
1542
+ spotifyCredentials?: SpotifyCredentialsConfig | undefined;
1543
+ clientId?: string | undefined;
1544
+ clientSecret?: string | undefined;
1545
+ market?: string | undefined;
1546
+ }
1547
+ interface SpotifyTrackMeta extends WsperResponseMeta {
1548
+ externalSourceUrl: string | null;
1549
+ }
1550
+ interface SpotifyImage {
1551
+ url: string;
1552
+ width: number | null;
1553
+ height: number | null;
1554
+ }
1555
+ interface NormalizedSpotifyArtist {
1556
+ id: string;
1557
+ name: string;
1558
+ uri: string;
1559
+ url: string | null;
1560
+ type: string | null;
1561
+ }
1562
+ interface NormalizedSpotifyAlbum {
1563
+ id: string;
1564
+ name: string;
1565
+ type: string | null;
1566
+ albumType: string | null;
1567
+ uri: string;
1568
+ url: string | null;
1569
+ releaseDate: string | null;
1570
+ releaseDatePrecision: string | null;
1571
+ totalTracks: number | null;
1572
+ images: SpotifyImage[];
1573
+ artists: NormalizedSpotifyArtist[];
1574
+ copyrights: Array<{
1575
+ text: string;
1576
+ type: string;
1577
+ }>;
1578
+ label: string | null;
1579
+ popularity: number | null;
1580
+ }
1581
+ interface YtDlpChannel {
1582
+ id: string | null;
1583
+ name: string | null;
1584
+ url: string | null;
1585
+ isVerified: boolean | null;
1586
+ followerCount: number | null;
1587
+ }
1588
+ interface YtDlpUploader {
1589
+ name: string | null;
1590
+ id: string | null;
1591
+ url: string | null;
1592
+ }
1593
+ interface YtDlpStats {
1594
+ viewCount: number | null;
1595
+ likeCount: number | null;
1596
+ commentCount: number | null;
1597
+ }
1598
+ interface ExternalSource {
1599
+ provider: string;
1600
+ extractor: string | null;
1601
+ id: string | null;
1602
+ displayId: string | null;
1603
+ title: string | null;
1604
+ fullTitle: string | null;
1605
+ url: string | null;
1606
+ originalUrl: string | null;
1607
+ durationSeconds: number | null;
1608
+ durationString: string | null;
1609
+ mediaType: string | null;
1610
+ availability: string | null;
1611
+ isLive: boolean;
1612
+ wasLive: boolean;
1613
+ playableInEmbed: boolean | null;
1614
+ ageLimit: number | null;
1615
+ uploadDate: string | null;
1616
+ timestamp: number | null;
1617
+ thumbnail: string | null;
1618
+ channel: YtDlpChannel;
1619
+ uploader: YtDlpUploader;
1620
+ stats: YtDlpStats;
1621
+ categories: string[];
1622
+ tags: string[];
1623
+ }
1624
+ interface DownloadAudioFormat {
1625
+ formatId: string | null;
1626
+ ext: string | null;
1627
+ formatNote: string | null;
1628
+ protocol: string | null;
1629
+ acodec: string | null;
1630
+ vcodec: string | null;
1631
+ abr: number | null;
1632
+ asr: number | null;
1633
+ audioChannels: number | null;
1634
+ filesize: number | null;
1635
+ resolution: string | null;
1636
+ hasDrm: boolean;
1637
+ }
1638
+ interface SelectedDownload {
1639
+ formatId: string | null;
1640
+ ext: string | null;
1641
+ resolution: string | null;
1642
+ video: {
1643
+ formatId: string | null;
1644
+ ext: string | null;
1645
+ width: number | null;
1646
+ height: number | null;
1647
+ fps: number | null;
1648
+ vcodec: string | null;
1649
+ acodec: string | null;
1650
+ filesize: number | null;
1651
+ } | null;
1652
+ audio: DownloadAudioFormat | null;
1653
+ }
1654
+ interface DownloadMetadata {
1655
+ enabled: boolean;
1656
+ tool: "yt-dlp";
1657
+ sourceUrl: string | null;
1658
+ recommendedAudioFormat: DownloadAudioFormat | null;
1659
+ fallbackAudioFormats: DownloadAudioFormat[];
1660
+ selectedDownload: SelectedDownload | null;
1661
+ commandHint: string | null;
1662
+ }
1663
+ interface NormalizedSpotifyTrack {
1664
+ id: string;
1665
+ name: string;
1666
+ type: string | null;
1667
+ uri: string;
1668
+ url: string | null;
1669
+ durationMs: number;
1670
+ durationSeconds: number;
1671
+ explicit: boolean;
1672
+ popularity: number | null;
1673
+ previewUrl: string | null;
1674
+ trackNumber: number | null;
1675
+ discNumber: number | null;
1676
+ isLocal: boolean;
1677
+ isPlayable: boolean | null;
1678
+ artists: NormalizedSpotifyArtist[];
1679
+ album: NormalizedSpotifyAlbum;
1680
+ externalIds: Record<string, string>;
1681
+ availableMarkets: string[];
1682
+ externalSource: ExternalSource | null;
1683
+ download: DownloadMetadata | null;
1684
+ }
1685
+ interface NormalizedSpotifyAlbumTrack {
1686
+ id: string;
1687
+ name: string;
1688
+ type: string | null;
1689
+ uri: string;
1690
+ url: string | null;
1691
+ durationMs: number;
1692
+ durationSeconds: number;
1693
+ explicit: boolean;
1694
+ previewUrl: string | null;
1695
+ trackNumber: number | null;
1696
+ discNumber: number | null;
1697
+ isLocal: boolean;
1698
+ artists: NormalizedSpotifyArtist[];
1699
+ externalSource: ExternalSource | null;
1700
+ download: DownloadMetadata | null;
1701
+ }
1702
+ interface NormalizedSpotifyPlaylistTrackItem {
1703
+ addedAt: string | null;
1704
+ addedBy: {
1705
+ id: string | null;
1706
+ uri: string | null;
1707
+ url: string | null;
1708
+ } | null;
1709
+ isLocal: boolean;
1710
+ track: NormalizedSpotifyTrack;
1711
+ }
1712
+ interface NormalizedSpotifyPlaylist {
1713
+ id: string;
1714
+ name: string;
1715
+ description: string | null;
1716
+ uri: string;
1717
+ url: string | null;
1718
+ public: boolean | null;
1719
+ collaborative: boolean;
1720
+ snapshotId: string | null;
1721
+ owner: {
1722
+ id: string | null;
1723
+ name: string | null;
1724
+ uri: string | null;
1725
+ url: string | null;
1726
+ } | null;
1727
+ followersCount: number | null;
1728
+ images: SpotifyImage[];
1729
+ tracksTotal: number;
1730
+ tracks: NormalizedSpotifyPlaylistTrackItem[];
1731
+ }
1732
+ type SpotifyEntityType = "track" | "album" | "playlist" | "artist";
1733
+ interface SpotifySearchResult {
1734
+ query: string;
1735
+ tracks: NormalizedSpotifyTrack[];
1736
+ albums: NormalizedSpotifyAlbum[];
1737
+ }
1738
+ interface SpotifyOAuthToken {
1739
+ accessToken: string;
1740
+ refreshToken: string | null;
1741
+ expiresIn: number;
1742
+ tokenType: string;
1743
+ scope: string | null;
1744
+ }
1745
+ type SpotifyDownloadAudioFormat = "mp3" | "m4a" | "opus" | "flac" | "wav";
1746
+ interface SpotifyDownloadAsset {
1747
+ sourceUrl: string;
1748
+ outputPath: string;
1749
+ type: "audio";
1750
+ trackId: string;
1751
+ name: string;
1752
+ }
1753
+ interface SpotifyDownloadResult {
1754
+ sourceUrl: string;
1755
+ outputDir: string;
1756
+ metadataPath: string | null;
1757
+ assets: SpotifyDownloadAsset[];
1758
+ }
1759
+ interface SpotifyDownloadPostInput {
1760
+ trackUrlOrId?: string;
1761
+ trackUrl?: string;
1762
+ trackId?: string;
1763
+ outputDir: string;
1764
+ audioFormat?: SpotifyDownloadAudioFormat | undefined;
1765
+ ytdlpPath?: string | undefined;
1766
+ includeMetadata?: boolean;
1767
+ }
1768
+ interface SpotifyDownloadProfileInput {
1769
+ playlistUrlOrId?: string;
1770
+ albumUrlOrId?: string;
1771
+ profileUrlOrId?: string;
1772
+ kind?: "playlist" | "album";
1773
+ outputDir: string;
1774
+ limit?: number;
1775
+ audioFormat?: SpotifyDownloadAudioFormat | undefined;
1776
+ ytdlpPath?: string | undefined;
1777
+ includeMetadata?: boolean;
1778
+ }
1779
+
1780
+ interface SpotifyAlbumWithTracks extends NormalizedSpotifyAlbum {
1781
+ albumTracks: NormalizedSpotifyAlbumTrack[];
1782
+ }
1783
+
1784
+ declare class SpotifyScraper {
1785
+ #private;
1786
+ constructor(options?: SpotifyScraperOptions);
1787
+ enableLogs(): this;
1788
+ disableLogs(): this;
1789
+ getCredentialSource(): SpotifyCredentialSource;
1790
+ getTrack(input: string, options?: {
1791
+ enrichYtDlp?: boolean;
1792
+ }): Promise<WsperResponse<NormalizedSpotifyTrack, SpotifyTrackMeta>>;
1793
+ getAlbum(input: string, options?: {
1794
+ enrichYtDlp?: boolean;
1795
+ enrichLimit?: number;
1796
+ }): Promise<WsperResponse<SpotifyAlbumWithTracks>>;
1797
+ getPlaylist(input: string, options?: {
1798
+ enrichYtDlp?: boolean;
1799
+ enrichLimit?: number;
1800
+ }): Promise<WsperResponse<NormalizedSpotifyPlaylist>>;
1801
+ search(query: string, options?: {
1802
+ limit?: number;
1803
+ type?: Array<"track" | "album">;
1804
+ }): Promise<WsperResponse<SpotifySearchResult>>;
1805
+ downloadPost(input: SpotifyDownloadPostInput): Promise<WsperResponse<SpotifyDownloadResult>>;
1806
+ downloadProfile(input: SpotifyDownloadProfileInput): Promise<WsperResponse<SpotifyDownloadResult>>;
1807
+ createAuthUrl(options?: {
1808
+ state?: string;
1809
+ scopes?: string[];
1810
+ }): {
1811
+ state: string;
1812
+ url: string;
1813
+ };
1814
+ exchangeCode(code: string): Promise<SpotifyOAuthToken>;
1815
+ refreshToken(refreshToken: string): Promise<SpotifyOAuthToken>;
1816
+ getAccessToken(): Promise<string>;
1817
+ invalidateToken(): void;
1818
+ }
1819
+
1820
+ declare function createSpotifyAuthUrl(options: {
1821
+ clientId: string;
1822
+ callbackUrl: string;
1823
+ state?: string;
1824
+ scopes?: string[];
1825
+ }): {
1826
+ state: string;
1827
+ url: string;
1828
+ };
1829
+ declare function exchangeSpotifyCodeForToken(code: string, options: {
1830
+ clientId: string;
1831
+ clientSecret: string;
1832
+ callbackUrl: string;
1833
+ }): Promise<SpotifyOAuthToken>;
1834
+ declare function refreshSpotifyAccessToken(refreshToken: string, options: {
1835
+ clientId: string;
1836
+ clientSecret: string;
1837
+ }): Promise<SpotifyOAuthToken>;
1838
+
1839
+ interface SpotifyExtracted {
1840
+ type: SpotifyEntityType;
1841
+ id: string;
1842
+ }
1843
+ declare function extractSpotifyId(input: string, expectedType?: SpotifyEntityType): SpotifyExtracted;
1844
+
1845
+ declare function normalizePathfinderTrack(response: unknown): NormalizedSpotifyTrack;
1846
+
1847
+ declare function safeFileName(input: string): string;
1848
+ interface YtDlpOptions {
1849
+ sourceUrl: string;
1850
+ track: NormalizedSpotifyTrack | NormalizedSpotifyAlbumTrack;
1851
+ outputDir?: string | undefined;
1852
+ audioFormat?: "mp3" | "m4a" | "opus" | "flac" | "wav" | undefined;
1853
+ ytdlpPath?: string | undefined;
1854
+ }
1855
+ declare function downloadWithYtDlp(params: YtDlpOptions): Promise<string>;
1856
+
1857
+ declare function buildYtDlpSearchQuery(track: {
1858
+ name: string;
1859
+ artists: Array<{
1860
+ name: string;
1861
+ }>;
1862
+ }): string;
1863
+ declare function searchYtDlpByTrack(track: {
1864
+ name: string;
1865
+ durationSeconds?: number;
1866
+ artists: Array<{
1867
+ name: string;
1868
+ }>;
1869
+ }): Promise<Record<string, unknown> | null>;
1870
+
1871
+ declare function normalizeYtDlpExternalSource(metadata: Record<string, unknown>): ExternalSource;
1872
+ declare function normalizeYtDlpDownload(metadata: Record<string, unknown>): DownloadMetadata;
1873
+
1874
+ declare function enrichTrackWithYtDlp<T extends NormalizedSpotifyTrack | NormalizedSpotifyAlbumTrack>(track: T, options?: {
1875
+ enabled?: boolean;
1876
+ }): Promise<T>;
1877
+
1878
+ declare function exportJson(outputPath: string, data: unknown): Promise<string>;
1879
+
1880
+ interface StalkScraperOptions {
1881
+ npmRegistryUrl?: string | undefined;
1882
+ debug?: boolean | undefined;
1883
+ http?: HttpOptions | undefined;
1884
+ queue?: QueueOptions | undefined;
1885
+ }
1886
+ interface NpmCollaborator {
1887
+ name: string;
1888
+ url: string;
1889
+ }
1890
+ interface NpmInfoItem {
1891
+ type: string;
1892
+ result: string;
1893
+ }
1894
+ interface NpmPackage {
1895
+ title: string;
1896
+ language: string;
1897
+ publish: string;
1898
+ readme: string;
1899
+ explore: string;
1900
+ dependencies: string;
1901
+ dependents: string;
1902
+ version_count: string;
1903
+ keywords: string[];
1904
+ install: string;
1905
+ info: NpmInfoItem[];
1906
+ collaborator: NpmCollaborator[];
1907
+ }
1908
+
1909
+ declare class StalkScraper {
1910
+ #private;
1911
+ constructor(options?: StalkScraperOptions);
1912
+ enableLogs(): this;
1913
+ disableLogs(): this;
1914
+ getNpmPackage(packageName: string): Promise<WsperResponse<NpmPackage>>;
1915
+ }
1916
+
1917
+ declare function parseNpmPackage(input: unknown, requestedName: string): NpmPackage;
1918
+
1919
+ interface YouTubeScraperOptions {
1920
+ debug?: boolean;
1921
+ ytdlpPath?: string;
1922
+ ffmpegPath?: string;
1923
+ ffprobePath?: string;
1924
+ outputDir?: string;
1925
+ searchLimit?: number;
1926
+ }
1927
+ interface YoutubeThumbnail {
1928
+ url: string;
1929
+ width: number | null;
1930
+ height: number | null;
1931
+ }
1932
+ interface YoutubeChannel {
1933
+ id: string | null;
1934
+ name: string | null;
1935
+ url: string | null;
1936
+ handle: string | null;
1937
+ isVerified: boolean | null;
1938
+ followerCount: number | null;
1939
+ }
1940
+ interface YoutubeUploader {
1941
+ id: string | null;
1942
+ name: string | null;
1943
+ url: string | null;
1944
+ }
1945
+ interface YoutubeStats {
1946
+ viewCount: number | null;
1947
+ likeCount: number | null;
1948
+ commentCount: number | null;
1949
+ repostCount: number | null;
1950
+ }
1951
+ interface YoutubeAudioFormat {
1952
+ formatId: string | null;
1953
+ ext: string | null;
1954
+ formatNote: string | null;
1955
+ protocol: string | null;
1956
+ acodec: string | null;
1957
+ vcodec: string | null;
1958
+ abr: number | null;
1959
+ asr: number | null;
1960
+ audioChannels: number | null;
1961
+ filesize: number | null;
1962
+ resolution: string | null;
1963
+ hasDrm: boolean;
1964
+ }
1965
+ interface YoutubeVideoFormat {
1966
+ formatId: string | null;
1967
+ ext: string | null;
1968
+ formatNote: string | null;
1969
+ protocol: string | null;
1970
+ vcodec: string | null;
1971
+ acodec: string | null;
1972
+ width: number | null;
1973
+ height: number | null;
1974
+ fps: number | null;
1975
+ vbr: number | null;
1976
+ filesize: number | null;
1977
+ resolution: string | null;
1978
+ hasDrm: boolean;
1979
+ }
1980
+ interface YoutubeSelectedDownload {
1981
+ formatId: string | null;
1982
+ ext: string | null;
1983
+ resolution: string | null;
1984
+ video: YoutubeVideoFormat | null;
1985
+ audio: YoutubeAudioFormat | null;
1986
+ }
1987
+ interface YoutubeDownloadInfo {
1988
+ enabled: boolean;
1989
+ tool: "yt-dlp";
1990
+ sourceUrl: string | null;
1991
+ recommendedAudioFormat: YoutubeAudioFormat | null;
1992
+ fallbackAudioFormats: YoutubeAudioFormat[];
1993
+ recommendedVideoFormat: YoutubeVideoFormat | null;
1994
+ fallbackVideoFormats: YoutubeVideoFormat[];
1995
+ selectedDownload: YoutubeSelectedDownload | null;
1996
+ commandHint: string | null;
1997
+ }
1998
+ interface YoutubeVideoMetadata {
1999
+ provider: "youtube";
2000
+ extractor: string | null;
2001
+ id: string;
2002
+ displayId: string | null;
2003
+ title: string;
2004
+ fullTitle: string | null;
2005
+ url: string;
2006
+ originalUrl: string | null;
2007
+ durationSeconds: number | null;
2008
+ durationString: string | null;
2009
+ mediaType: string | null;
2010
+ availability: string | null;
2011
+ isLive: boolean;
2012
+ wasLive: boolean;
2013
+ playableInEmbed: boolean | null;
2014
+ ageLimit: number | null;
2015
+ uploadDate: string | null;
2016
+ timestamp: number | null;
2017
+ description: string | null;
2018
+ thumbnail: string | null;
2019
+ thumbnails: YoutubeThumbnail[];
2020
+ channel: YoutubeChannel;
2021
+ uploader: YoutubeUploader;
2022
+ stats: YoutubeStats;
2023
+ categories: string[];
2024
+ tags: string[];
2025
+ formats: {
2026
+ audio: YoutubeAudioFormat[];
2027
+ video: YoutubeVideoFormat[];
2028
+ };
2029
+ download: YoutubeDownloadInfo;
2030
+ }
2031
+ interface YoutubeSearchResult {
2032
+ query: string;
2033
+ total: number;
2034
+ items: YoutubeVideoMetadata[];
2035
+ }
2036
+ interface YoutubePlaylistEntry {
2037
+ id: string | null;
2038
+ title: string | null;
2039
+ url: string | null;
2040
+ durationSeconds: number | null;
2041
+ }
2042
+ interface YoutubePlaylistData {
2043
+ id: string | null;
2044
+ title: string | null;
2045
+ url: string | null;
2046
+ uploader: string | null;
2047
+ channel: string | null;
2048
+ entriesTotal: number;
2049
+ entries: YoutubePlaylistEntry[];
2050
+ }
2051
+ interface YoutubeChannelData {
2052
+ id: string | null;
2053
+ title: string | null;
2054
+ url: string | null;
2055
+ channel: string | null;
2056
+ channelId: string | null;
2057
+ uploader: string | null;
2058
+ uploaderId: string | null;
2059
+ entriesTotal: number;
2060
+ entries: YoutubePlaylistEntry[];
2061
+ }
2062
+ interface YoutubeDownloadResult {
2063
+ sourceUrl: string;
2064
+ outputDir: string;
2065
+ format: string;
2066
+ type: "video" | "audio";
2067
+ command: string[];
2068
+ }
2069
+ interface YoutubeAudioExtractResult {
2070
+ inputPath: string;
2071
+ outputPath: string;
2072
+ format: string;
2073
+ bitrate: string | null;
2074
+ }
2075
+ type YoutubeAudioFormatId = "mp3" | "m4a" | "opus" | "flac" | "wav";
2076
+
2077
+ declare class YouTubeScraper {
2078
+ #private;
2079
+ constructor(options?: YouTubeScraperOptions);
2080
+ enableLogs(): this;
2081
+ disableLogs(): this;
2082
+ getVideo(input: string): Promise<WsperResponse<YoutubeVideoMetadata>>;
2083
+ searchVideos(query: string, options?: {
2084
+ limit?: number;
2085
+ }): Promise<WsperResponse<YoutubeSearchResult>>;
2086
+ downloadVideo(input: string, options?: {
2087
+ outputDir?: string;
2088
+ fileName?: string;
2089
+ format?: string;
2090
+ }): Promise<WsperResponse<YoutubeDownloadResult>>;
2091
+ downloadAudio(input: string, options?: {
2092
+ outputDir?: string;
2093
+ fileName?: string;
2094
+ audioFormat?: YoutubeAudioFormatId;
2095
+ }): Promise<WsperResponse<YoutubeDownloadResult>>;
2096
+ extractAudio(inputPath: string, options?: {
2097
+ outputPath?: string;
2098
+ outputDir?: string;
2099
+ audioFormat?: YoutubeAudioFormatId;
2100
+ audioBitrate?: string;
2101
+ }): Promise<WsperResponse<YoutubeAudioExtractResult>>;
2102
+ getPlaylist(input: string): Promise<WsperResponse<YoutubePlaylistData>>;
2103
+ getChannel(input: string): Promise<WsperResponse<YoutubeChannelData>>;
2104
+ }
2105
+
2106
+ interface YoutubeBasicInfo {
2107
+ id: string | null;
2108
+ title: string | null;
2109
+ url: string | null;
2110
+ durationSeconds: number | null;
2111
+ channel: {
2112
+ name: string | null;
2113
+ id: string | null;
2114
+ url: string | null;
2115
+ };
2116
+ thumbnails: unknown[];
2117
+ }
2118
+
2119
+ interface ThreadsMediaCandidate {
2120
+ url: string;
2121
+ width: number | null;
2122
+ height: number | null;
2123
+ }
2124
+ interface ThreadsVideoVersion {
2125
+ url: string;
2126
+ width: number | null;
2127
+ height: number | null;
2128
+ type: number | null;
2129
+ }
2130
+ interface ThreadsBioLink {
2131
+ url: string;
2132
+ title: string | null;
2133
+ }
2134
+ interface ThreadsCaption {
2135
+ text: string;
2136
+ pk: string | null;
2137
+ hasTranslation: boolean;
2138
+ }
2139
+ interface ThreadsStats {
2140
+ likeCount: number | null;
2141
+ directReplyCount: number | null;
2142
+ repostCount: number | null;
2143
+ quoteCount: number | null;
2144
+ reshareCount: number | null;
2145
+ impressionCount: number | null;
2146
+ }
2147
+ interface ThreadsTopic {
2148
+ id: string | null;
2149
+ name: string | null;
2150
+ }
2151
+ interface ThreadsMedia {
2152
+ images: ThreadsMediaCandidate[];
2153
+ videos: ThreadsVideoVersion[];
2154
+ carousel: ThreadsMediaItem[];
2155
+ bestImage: ThreadsMediaCandidate | null;
2156
+ bestVideo: ThreadsVideoVersion | null;
2157
+ }
2158
+ interface ThreadsMediaItem {
2159
+ id: string | null;
2160
+ pk: string | null;
2161
+ mediaType: number | null;
2162
+ images: ThreadsMediaCandidate[];
2163
+ videos: ThreadsVideoVersion[];
2164
+ bestImage: ThreadsMediaCandidate | null;
2165
+ bestVideo: ThreadsVideoVersion | null;
2166
+ }
2167
+ interface ThreadsUser {
2168
+ id: string | null;
2169
+ pk: string | null;
2170
+ username: string | null;
2171
+ fullName: string | null;
2172
+ biography: string | null;
2173
+ profilePicUrl: string | null;
2174
+ hdProfilePics: ThreadsMediaCandidate[];
2175
+ followerCount: number | null;
2176
+ isVerified: boolean | null;
2177
+ isPrivate: boolean | null;
2178
+ bioLinks: ThreadsBioLink[];
2179
+ }
2180
+ interface ThreadsPost {
2181
+ id: string | null;
2182
+ pk: string | null;
2183
+ fbid: string | null;
2184
+ code: string | null;
2185
+ url: string | null;
2186
+ takenAt: number | null;
2187
+ mediaType: number | null;
2188
+ author: ThreadsUser | null;
2189
+ caption: ThreadsCaption | null;
2190
+ stats: ThreadsStats;
2191
+ topic: ThreadsTopic | null;
2192
+ media: ThreadsMedia;
2193
+ replies: ThreadsPost[];
2194
+ }
2195
+ interface ThreadsProfile extends ThreadsUser {
2196
+ profileUrl: string | null;
2197
+ threadsCountText: string | null;
2198
+ publicViewCount: number | null;
2199
+ posts: ThreadsPost[];
2200
+ }
2201
+ interface ThreadsPageInfo {
2202
+ cursor: string | null;
2203
+ hasNextPage: boolean;
2204
+ }
2205
+ interface ThreadsSearchResult {
2206
+ query: string;
2207
+ serpType: "default" | "tags" | "users";
2208
+ language: string;
2209
+ count: number;
2210
+ results: (ThreadsPost | ThreadsUser)[];
2211
+ pageInfo: ThreadsPageInfo;
2212
+ }
2213
+ interface ThreadsDownloadAsset {
2214
+ url: string;
2215
+ outputPath: string;
2216
+ type: "image" | "video";
2217
+ index: number;
2218
+ }
2219
+ interface ThreadsDownloadResult {
2220
+ sourceUrl: string;
2221
+ outputDir: string;
2222
+ metadataPath: string | null;
2223
+ assets: ThreadsDownloadAsset[];
2224
+ }
2225
+ interface ThreadsSearchOptions {
2226
+ lang?: string;
2227
+ limit?: number;
2228
+ cursor?: string;
2229
+ }
2230
+ interface ThreadsPostInput {
2231
+ username: string;
2232
+ shortcode: string;
2233
+ }
2234
+ interface ThreadsDownloadProfileInput {
2235
+ usernameOrUrl: string;
2236
+ outputDir: string;
2237
+ includeProfilePicture?: boolean;
2238
+ includeInitialPosts?: boolean;
2239
+ includeMetadata?: boolean;
2240
+ }
2241
+ interface ThreadsDownloadPostInput {
2242
+ postUrl: string;
2243
+ outputDir: string;
2244
+ includeMetadata?: boolean;
2245
+ }
2246
+ interface ThreadsScraperOptions {
2247
+ credentials?: WsperCredentials;
2248
+ debug?: boolean;
2249
+ http?: HttpOptions;
2250
+ queue?: QueueOptions;
2251
+ }
2252
+
2253
+ declare class ThreadsScraper {
2254
+ #private;
2255
+ constructor(options?: ThreadsScraperOptions);
2256
+ enableLogs(): this;
2257
+ disableLogs(): this;
2258
+ getProfile(usernameOrUrl: string): Promise<WsperResponse<ThreadsProfile>>;
2259
+ getPost(input: string | ThreadsPostInput): Promise<WsperResponse<ThreadsPost>>;
2260
+ search(query: string, options?: ThreadsSearchOptions): Promise<WsperResponse<ThreadsSearchResult>>;
2261
+ searchByTag(query: string, options?: ThreadsSearchOptions): Promise<WsperResponse<ThreadsSearchResult>>;
2262
+ searchUsers(query: string, options?: ThreadsSearchOptions): Promise<WsperResponse<ThreadsSearchResult>>;
2263
+ downloadPost(input: ThreadsDownloadPostInput): Promise<WsperResponse<ThreadsDownloadResult>>;
2264
+ downloadProfile(input: ThreadsDownloadProfileInput): Promise<WsperResponse<ThreadsDownloadResult>>;
2265
+ }
2266
+
2267
+ interface PinterestImageVariant {
2268
+ key: string;
2269
+ url: string;
2270
+ width: number | null;
2271
+ height: number | null;
2272
+ }
2273
+ interface PinterestVideoVariant {
2274
+ url: string;
2275
+ width: number | null;
2276
+ height: number | null;
2277
+ durationMs: number | null;
2278
+ contentType: string | null;
2279
+ }
2280
+ interface PinterestStoryBlock {
2281
+ type: string;
2282
+ imageUrl: string | null;
2283
+ videoUrl: string | null;
2284
+ }
2285
+ interface PinterestStoryPage {
2286
+ index: number;
2287
+ blocks: PinterestStoryBlock[];
2288
+ }
2289
+ interface PinterestMedia {
2290
+ images: PinterestImageVariant[];
2291
+ bestImage: PinterestImageVariant | null;
2292
+ videos: PinterestVideoVariant[];
2293
+ bestVideo: PinterestVideoVariant | null;
2294
+ storyPages: PinterestStoryPage[];
2295
+ }
2296
+ interface PinterestUser {
2297
+ id: string | null;
2298
+ username: string | null;
2299
+ fullName: string | null;
2300
+ imageMediumUrl: string | null;
2301
+ imageLargeUrl: string | null;
2302
+ }
2303
+ interface PinterestBoard {
2304
+ id: string | null;
2305
+ nodeId: string | null;
2306
+ name: string | null;
2307
+ url: string | null;
2308
+ }
2309
+ interface PinterestStats {
2310
+ repinCount: number | null;
2311
+ commentCount: number | null;
2312
+ }
2313
+ interface PinterestPin {
2314
+ id: string;
2315
+ nodeId: string | null;
2316
+ title: string | null;
2317
+ description: string | null;
2318
+ domain: string | null;
2319
+ link: string | null;
2320
+ url: string;
2321
+ media: PinterestMedia;
2322
+ pinner: PinterestUser | null;
2323
+ board: PinterestBoard | null;
2324
+ stats: PinterestStats;
2325
+ }
2326
+ interface PinterestPageInfo {
2327
+ bookmark: string | null;
2328
+ hasNextPage: boolean;
2329
+ }
2330
+ interface PinterestSearchResult {
2331
+ query: string;
2332
+ count: number;
2333
+ pins: PinterestPin[];
2334
+ pageInfo: PinterestPageInfo;
2335
+ }
2336
+ interface PinterestDownloadAsset {
2337
+ url: string;
2338
+ outputPath: string;
2339
+ type: "image" | "video";
2340
+ index: number;
2341
+ }
2342
+ interface PinterestDownloadResult {
2343
+ sourceUrl: string;
2344
+ outputDir: string;
2345
+ metadataPath: string | null;
2346
+ assets: PinterestDownloadAsset[];
2347
+ }
2348
+ interface PinterestSearchOptions {
2349
+ limit?: number;
2350
+ locale?: string;
2351
+ bookmark?: string;
2352
+ }
2353
+ interface PinterestDownloadPinInput {
2354
+ pinUrlOrId: string;
2355
+ outputDir: string;
2356
+ includeMetadata?: boolean;
2357
+ includeStoryPages?: boolean;
2358
+ }
2359
+ interface PinterestScraperOptions {
2360
+ credentials?: WsperCredentials;
2361
+ debug?: boolean;
2362
+ http?: HttpOptions;
2363
+ queue?: QueueOptions;
2364
+ }
2365
+
2366
+ declare class PinterestScraper {
2367
+ #private;
2368
+ constructor(options?: PinterestScraperOptions);
2369
+ enableLogs(): this;
2370
+ disableLogs(): this;
2371
+ getPin(input: string): Promise<WsperResponse<PinterestPin>>;
2372
+ searchPins(query: string, options?: PinterestSearchOptions): Promise<WsperResponse<PinterestSearchResult>>;
2373
+ downloadPin(input: PinterestDownloadPinInput): Promise<WsperResponse<PinterestDownloadResult>>;
2374
+ }
2375
+
2376
+ interface PhotoAiScraperOptions {
2377
+ baseUrl?: string | undefined;
2378
+ maxImageSizeBytes?: number | undefined;
2379
+ debug?: boolean | undefined;
2380
+ http?: HttpOptions | undefined;
2381
+ queue?: QueueOptions | undefined;
2382
+ }
2383
+ interface PhotoAiUploadResult {
2384
+ code: string;
2385
+ }
2386
+ interface PhotoAiCheckResult {
2387
+ status: string;
2388
+ downloadUrl: string | null;
2389
+ raw: Record<string, unknown>;
2390
+ }
2391
+
2392
+ declare class PhotoAiScraper {
2393
+ #private;
2394
+ constructor(options?: PhotoAiScraperOptions);
2395
+ enableLogs(): this;
2396
+ disableLogs(): this;
2397
+ upload(filePath: string): Promise<WsperResponse<PhotoAiUploadResult>>;
2398
+ uploadBuffer(imageBuffer: Buffer, filename?: string, startedAt?: number): Promise<WsperResponse<PhotoAiUploadResult>>;
2399
+ checkStatus(code: string): Promise<WsperResponse<PhotoAiCheckResult>>;
2400
+ }
2401
+
2402
+ declare function parsePhotoAiUploadResponse(input: unknown): PhotoAiUploadResult;
2403
+ declare function parsePhotoAiCheckResponse(input: unknown): PhotoAiCheckResult;
2404
+
2405
+ interface TwitterUser {
2406
+ id: string;
2407
+ screenName: string;
2408
+ name: string;
2409
+ description: string | null;
2410
+ createdAt: string | null;
2411
+ location: string | null;
2412
+ profilePicUrl: string | null;
2413
+ profileBannerUrl: string | null;
2414
+ url: string | null;
2415
+ followersCount: number | null;
2416
+ followingCount: number | null;
2417
+ favouritesCount: number | null;
2418
+ listedCount: number | null;
2419
+ mediaCount: number | null;
2420
+ statusesCount: number | null;
2421
+ isBlueVerified: boolean | null;
2422
+ isVerified: boolean | null;
2423
+ }
2424
+ interface TwitterTweetStats {
2425
+ bookmarkCount: number | null;
2426
+ favoriteCount: number | null;
2427
+ retweetCount: number | null;
2428
+ replyCount: number | null;
2429
+ quoteCount: number | null;
2430
+ viewCount: number | null;
2431
+ }
2432
+ interface TwitterEntityUrl {
2433
+ url: string;
2434
+ expandedUrl: string | null;
2435
+ displayUrl: string | null;
2436
+ }
2437
+ interface TwitterHashtag {
2438
+ text: string;
2439
+ }
2440
+ interface TwitterMention {
2441
+ screenName: string;
2442
+ name: string | null;
2443
+ id: string | null;
2444
+ }
2445
+ interface TwitterEntities {
2446
+ urls: TwitterEntityUrl[];
2447
+ hashtags: TwitterHashtag[];
2448
+ mentions: TwitterMention[];
2449
+ }
2450
+ interface TwitterVideoVariant {
2451
+ url: string;
2452
+ contentType: string;
2453
+ bitrate: number | null;
2454
+ }
2455
+ interface TwitterVideoInfo {
2456
+ durationMs: number | null;
2457
+ aspectRatio: [number, number] | null;
2458
+ variants: TwitterVideoVariant[];
2459
+ bestMp4: TwitterVideoVariant | null;
2460
+ hlsUrl: string | null;
2461
+ }
2462
+ interface TwitterMedia {
2463
+ id: string | null;
2464
+ mediaKey: string | null;
2465
+ type: "photo" | "video" | "animated_gif" | string;
2466
+ mediaUrl: string | null;
2467
+ originalWidth: number | null;
2468
+ originalHeight: number | null;
2469
+ videoInfo: TwitterVideoInfo | null;
2470
+ }
2471
+ interface TwitterTweet {
2472
+ id: string;
2473
+ url: string;
2474
+ fullText: string;
2475
+ createdAt: string | null;
2476
+ lang: string | null;
2477
+ conversationId: string | null;
2478
+ author: TwitterUser | null;
2479
+ stats: TwitterTweetStats;
2480
+ entities: TwitterEntities;
2481
+ media: TwitterMedia[];
2482
+ source: string | null;
2483
+ isTranslatable: boolean | null;
2484
+ }
2485
+ interface TwitterCursor {
2486
+ type: "top" | "bottom" | string;
2487
+ value: string;
2488
+ }
2489
+ interface TwitterPageInfo {
2490
+ topCursor: string | null;
2491
+ bottomCursor: string | null;
2492
+ hasNextPage: boolean;
2493
+ }
2494
+ interface TwitterTweetDetail {
2495
+ tweet: TwitterTweet;
2496
+ replies: TwitterTweet[];
2497
+ sourceUrl: string;
2498
+ }
2499
+ interface TwitterSearchResult {
2500
+ query: string;
2501
+ querySource: string;
2502
+ product: string;
2503
+ tweets: TwitterTweet[];
2504
+ count: number;
2505
+ pageInfo: TwitterPageInfo;
2506
+ sourceUrl: string;
2507
+ }
2508
+ interface TwitterUserSearchResult {
2509
+ query: string;
2510
+ count: number;
2511
+ users: TwitterUser[];
2512
+ pageInfo: TwitterPageInfo;
2513
+ sourceUrl: string;
2514
+ }
2515
+ interface TwitterUserTimeline {
2516
+ userId: string;
2517
+ tweets: TwitterTweet[];
2518
+ pinnedTweet: TwitterTweet | null;
2519
+ count: number;
2520
+ pageInfo: TwitterPageInfo;
2521
+ sourceUrl: string;
2522
+ }
2523
+ interface TwitterDownloadAsset {
2524
+ url: string;
2525
+ outputPath: string;
2526
+ type: "photo" | "video" | "animated_gif";
2527
+ mediaIndex: number;
2528
+ }
2529
+ interface TwitterDownloadResult {
2530
+ tweetId: string;
2531
+ sourceUrl: string;
2532
+ outputDir: string;
2533
+ metadataPath: string | null;
2534
+ assets: TwitterDownloadAsset[];
2535
+ }
2536
+ interface TwitterProfileDownloadAsset {
2537
+ url: string;
2538
+ outputPath: string;
2539
+ type: "profile_image" | "profile_banner" | "photo" | "video" | "animated_gif";
2540
+ tweetId: string | null;
2541
+ mediaIndex: number;
2542
+ }
2543
+ interface TwitterProfileDownloadResult {
2544
+ user: TwitterUser;
2545
+ sourceUrl: string;
2546
+ outputDir: string;
2547
+ metadataPath: string | null;
2548
+ assets: TwitterProfileDownloadAsset[];
2549
+ }
2550
+ interface TwitterScraperOptions {
2551
+ credentials?: WsperCredentials;
2552
+ debug?: boolean;
2553
+ http?: HttpOptions;
2554
+ queue?: QueueOptions;
2555
+ }
2556
+ interface TwitterTweetInput {
2557
+ tweetUrl?: string;
2558
+ tweetId?: string;
2559
+ }
2560
+ interface TwitterSearchOptions {
2561
+ count?: number;
2562
+ cursor?: string;
2563
+ product?: "Top" | "Latest" | "People" | "Photos" | "Videos";
2564
+ querySource?: string;
2565
+ }
2566
+ interface TwitterUserTimelineInput {
2567
+ userId?: string;
2568
+ usernameOrUrl?: string;
2569
+ count?: number;
2570
+ cursor?: string;
2571
+ }
2572
+ interface TwitterDownloadTweetInput {
2573
+ tweetUrl?: string;
2574
+ tweetId?: string;
2575
+ outputDir: string;
2576
+ includeMetadata?: boolean;
2577
+ }
2578
+ interface TwitterDownloadProfileInput {
2579
+ usernameOrUrl: string;
2580
+ outputDir: string;
2581
+ includeProfileImage?: boolean;
2582
+ includeBanner?: boolean;
2583
+ includeInitialPosts?: boolean;
2584
+ count?: number;
2585
+ includeMetadata?: boolean;
2586
+ }
2587
+
2588
+ declare class TwitterScraper {
2589
+ #private;
2590
+ constructor(options?: TwitterScraperOptions);
2591
+ enableLogs(): this;
2592
+ disableLogs(): this;
2593
+ getTweet(input: TwitterTweetInput): Promise<WsperResponse<TwitterTweetDetail>>;
2594
+ searchTweets(query: string, options?: TwitterSearchOptions): Promise<WsperResponse<TwitterSearchResult>>;
2595
+ searchTrend(query: string, options?: TwitterSearchOptions): Promise<WsperResponse<TwitterSearchResult>>;
2596
+ searchByTag(tag: string, options?: TwitterSearchOptions): Promise<WsperResponse<TwitterSearchResult>>;
2597
+ searchUsers(query: string, options?: Omit<TwitterSearchOptions, "product">): Promise<WsperResponse<TwitterUserSearchResult>>;
2598
+ getProfile(usernameOrUrl: string): Promise<WsperResponse<TwitterUser>>;
2599
+ getUserTimeline(input: TwitterUserTimelineInput): Promise<WsperResponse<TwitterUserTimeline>>;
2600
+ downloadTweetMedia(input: TwitterDownloadTweetInput): Promise<WsperResponse<TwitterDownloadResult>>;
2601
+ downloadPost(input: TwitterDownloadTweetInput): Promise<WsperResponse<TwitterDownloadResult>>;
2602
+ downloadProfile(input: TwitterDownloadProfileInput): Promise<WsperResponse<TwitterProfileDownloadResult>>;
2603
+ }
2604
+
2605
+ interface UguuScraperOptions extends ScraperOptions {
2606
+ uploadUrl?: string | undefined;
2607
+ maxFileSizeBytes?: number | undefined;
2608
+ }
2609
+ interface UguuUploadResult {
2610
+ url: string;
2611
+ }
2612
+
2613
+ declare class UguuScraper {
2614
+ #private;
2615
+ constructor(options?: UguuScraperOptions);
2616
+ enableLogs(): this;
2617
+ disableLogs(): this;
2618
+ upload(buffer: Buffer, filename?: string): Promise<WsperResponse<UguuUploadResult>>;
2619
+ }
2620
+
2621
+ declare function parseUguuUploadResponse(raw: unknown): UguuUploadResult;
2622
+
2623
+ interface UpscalerScraperOptions {
2624
+ baseUrl?: string | undefined;
2625
+ maxImageSizeBytes?: number | undefined;
2626
+ maxPollAttempts?: number | undefined;
2627
+ pollIntervalMs?: number | undefined;
2628
+ model?: number | undefined;
2629
+ functionName?: string | undefined;
2630
+ settings?: string | undefined;
2631
+ debug?: boolean | undefined;
2632
+ http?: HttpOptions | undefined;
2633
+ queue?: QueueOptions | undefined;
2634
+ }
2635
+ interface UpscalerResult {
2636
+ id: string;
2637
+ input: string | null;
2638
+ output: string;
2639
+ }
2640
+
2641
+ declare class UpscalerScraper {
2642
+ #private;
2643
+ constructor(options?: UpscalerScraperOptions);
2644
+ enableLogs(): this;
2645
+ disableLogs(): this;
2646
+ upscale(imageInput: string | Buffer): Promise<WsperResponse<UpscalerResult>>;
2647
+ upscaleBuffer(imageBuffer: Buffer, mimeType?: string, startedAt?: number): Promise<WsperResponse<UpscalerResult>>;
2648
+ }
2649
+
2650
+ declare function parseUpscalerCreateResponse(input: unknown): string;
2651
+ declare function parseUpscalerResultResponse(input: unknown, taskId: string): UpscalerResult | null;
2652
+
2653
+ interface VideyScraperOptions extends ScraperOptions {
2654
+ uploadUrl?: string | undefined;
2655
+ maxFileSizeBytes?: number | undefined;
2656
+ visitorId?: string | undefined;
2657
+ }
2658
+ interface VideyUploadResult {
2659
+ output: unknown;
2660
+ }
2661
+
2662
+ declare class VideyScraper {
2663
+ #private;
2664
+ constructor(options?: VideyScraperOptions);
2665
+ enableLogs(): this;
2666
+ disableLogs(): this;
2667
+ upload(filePath: string): Promise<WsperResponse<VideyUploadResult>>;
2668
+ uploadBuffer(buffer: Buffer, filename?: string, startedAt?: number): Promise<WsperResponse<VideyUploadResult>>;
2669
+ }
2670
+
2671
+ declare function parseVideyUploadResponse(raw: unknown): VideyUploadResult;
2672
+
2673
+ interface WallpaperScraperOptions extends ScraperOptions {
2674
+ baseUrl?: string | undefined;
2675
+ }
2676
+ interface WallpaperItem {
2677
+ title: string;
2678
+ resolution: string;
2679
+ image: string;
2680
+ page: string;
2681
+ }
2682
+ interface WallpaperResult {
2683
+ total: number;
2684
+ results: WallpaperItem[];
2685
+ }
2686
+
2687
+ declare class WallpaperScraper {
2688
+ #private;
2689
+ constructor(options?: WallpaperScraperOptions);
2690
+ enableLogs(): this;
2691
+ disableLogs(): this;
2692
+ search(query: string): Promise<WsperResponse<WallpaperResult>>;
2693
+ }
2694
+
2695
+ declare function parseWallpaperSearchHtml(html: string, pageUrl: string): WallpaperResult;
2696
+
2697
+ interface Webp2Mp4ScraperOptions extends ScraperOptions {
2698
+ baseUrl?: string | undefined;
2699
+ maxFileSizeBytes?: number | undefined;
2700
+ }
2701
+ interface Webp2Mp4Result {
2702
+ url: string;
2703
+ }
2704
+ type Webp2Mp4Source = Buffer | string;
2705
+
2706
+ declare class Webp2Mp4Scraper {
2707
+ #private;
2708
+ constructor(options?: Webp2Mp4ScraperOptions);
2709
+ enableLogs(): this;
2710
+ disableLogs(): this;
2711
+ toMp4(source: Webp2Mp4Source): Promise<WsperResponse<Webp2Mp4Result>>;
2712
+ toPng(source: Webp2Mp4Source): Promise<WsperResponse<Webp2Mp4Result>>;
2713
+ }
2714
+
2715
+ declare function parseEzgifUploadForm(html: string, pageUrl: string): Record<string, string>;
2716
+ declare function parseEzgifOutputUrl(html: string, pageUrl: string, selector: string, attr: string): string;
2717
+
2718
+ interface WwCharScraperOptions extends ScraperOptions {
2719
+ baseUrl?: string | undefined;
2720
+ }
2721
+ interface WwCharResult {
2722
+ title: string;
2723
+ slug: string;
2724
+ url: string;
2725
+ bio: string | null;
2726
+ profile: Record<string, string>;
2727
+ images: string[];
2728
+ }
2729
+
2730
+ declare class WwCharScraper {
2731
+ #private;
2732
+ constructor(options?: WwCharScraperOptions);
2733
+ enableLogs(): this;
2734
+ disableLogs(): this;
2735
+ getCharacter(name: string): Promise<WsperResponse<WwCharResult>>;
2736
+ }
2737
+
2738
+ declare function parseWwCharHtml(html: string, pageUrl: string, slug: string): WwCharResult;
2739
+ declare function toWwCharSlug(name: string): string;
2740
+
2741
+ interface WsperPlatformCredentialsConfig {
2742
+ instagram?: WsperCredentials | undefined;
2743
+ pinterest?: WsperCredentials | undefined;
2744
+ threads?: WsperCredentials | undefined;
2745
+ twitter?: WsperCredentials | undefined;
2746
+ }
2747
+ interface WsperScraperConfig {
2748
+ debug?: boolean | undefined;
2749
+ spotifyCredentials?: SpotifyCredentialsConfig | undefined;
2750
+ credentials?: WsperPlatformCredentialsConfig | undefined;
2751
+ http?: HttpOptions | undefined;
2752
+ queue?: QueueOptions | undefined;
2753
+ youtube?: YouTubeScraperOptions | undefined;
2754
+ }
2755
+ declare class WsperScraper {
2756
+ readonly spotify: SpotifyScraper;
2757
+ readonly twitter: TwitterScraper;
2758
+ readonly threads: ThreadsScraper;
2759
+ readonly instagram: InstagramScraper;
2760
+ readonly pinterest: PinterestScraper;
2761
+ readonly youtube: YouTubeScraper;
2762
+ constructor(config?: WsperScraperConfig);
2763
+ }
2764
+
2765
+ declare function sleep(ms: number): Promise<void>;
2766
+
2767
+ declare function getDefaultUserAgent(): string;
2768
+ declare function getRandomUserAgent(): string;
2769
+
2770
+ interface BrowserHeaderProfile {
2771
+ userAgent: string;
2772
+ headers: Record<string, string>;
2773
+ }
2774
+ declare function getDefaultBrowserHeaderProfile(): BrowserHeaderProfile;
2775
+ declare function getRandomBrowserHeaderProfile(): BrowserHeaderProfile;
2776
+
2777
+ declare function assertNonEmptyString(value: unknown, name: string): string;
2778
+ declare function assertSafeHttpUrl(input: unknown, options?: {
2779
+ allowPrivateNetwork?: boolean;
2780
+ }): URL;
2781
+ declare function clampInteger(value: number, min: number, max: number): number;
2782
+ declare function isRetryableHttpError(error: unknown): boolean;
2783
+
2784
+ declare function normalizeUrl(input: string): string;
2785
+ declare function resolveUrl(base: string | URL, path: string): URL;
2786
+
2787
+ declare function zenFetchSource(url: string): Promise<string>;
2788
+ declare function zenWafSession(url: string): Promise<{
2789
+ cookie: string;
2790
+ headers: Record<string, string>;
2791
+ }>;
2792
+
2793
+ export { ANALYTICS_CHART_MODELS, ANALYTICS_CHART_MODEL_NAMES, ANIME_CHARACTERS, AlkitabScraper, type AlkitabScraperOptions, type AlkitabVerse, type AnalyticsChartModel, type AnalyticsChartModelName, type AnalyticsChartVariant, type AnalyticsImageOptions, type AnalyticsTheme, type Android1Item, type Android1Result, type AnimationConfig, type AnimationDirection, type AnimationMode, type AnimationStep, type AnimeCharacter, type AnimeQuoteItem, AnimeQuoteScraper, type AnimeQuoteScraperOptions, type AnimeRandomResult, AnimeRandomScraper, type AnimeRandomScraperOptions, type AptoideItem, type AptoideResult, type BMKGBaseUrls, type BMKGEarthquake, type BMKGEarthquakeFeed, type BMKGForecast, type BMKGNowcasting, BMKGScraper, type BMKGScraperOptions, type BMKGShakemapDownload, BMKG_DEFAULT_BASE_URLS, BMKG_PROVINCE_CODES, BMKG_QUEUE_DEFAULTS, type BackgroundConfig, type BackgroundLinearConfig, type BackgroundRadialConfig, type BackgroundSolidConfig, BiliBiliScraper, type BiliBiliScraperOptions, type BiliBiliSearchItem, type BiliBiliSearchResult, type BiliBiliVideoInfo, type BiliBiliVideoStream, type BratConfig, BratGenerator, type BratResult, type BrowserHeaderProfile, CANVAS_PRESETS, CUACA_CITY_COORDS, CUACA_DEFAULT_BASE_URLS, CUACA_QUEUE_DEFAULTS, CUACA_WIND_DIRECTIONS, type CanvasConfig, type CanvasPreset, type CapCutDownloadResult, CapCutScraper, type CapCutScraperOptions, ChartGenerator, type ConvertOptions, CredentialsManager, type CuacaBaseUrls, type CuacaResult, CuacaScraper, type CuacaScraperOptions, type CuacaSearchResult, type CuacaWarningInfo, DEFAULT_ANIMATION, DEFAULT_CANVAS, DEFAULT_PADDING, DEFAULT_TEXT, type DownloadAudioFormat, DownloadError, type DownloadMetadata, type DownloadOptions, type DownloadResult, Downloader, type DrakorArtist, type DrakorDetail, type DrakorEpisode, type DrakorGenre, type DrakorItem, type DrakorList, type DrakorPagination, DrakorScraper, type DrakorScraperOptions, type DramaboxListItem, type DramaboxResult, DramaboxScraper, type DramaboxScraperOptions, type ExternalSource, FFMPEG_PATH, type FaceswapResult, FaceswapScraper, type FaceswapScraperOptions, type GifOutputConfig, type HokInfoResult, HokInfoScraper, type HokInfoScraperOptions, HtmlMetadataParser, type HtmlToJpgPageOrientation, type HtmlToJpgPageSize, type HtmlToJpgResult, HtmlToJpgScraper, type HtmlToJpgScraperOptions, type HtmlToJpgTask, type HtmlToJpgUploadForm, HttpClient, HttpError, type HttpErrorOptions, type HttpOptions, type HttpRequestOptions, type HttpResponse, type IkiruMangaItem, type IkiruMangaResult, IkiruMangaScraper, type IkiruMangaScraperOptions, type ImageOutputConfig, type ImagePost, ImageScraper, type ImageScraperOptions, type ImageSearchOptions, type ImageSearchResult, type ImageSiteName, type ImgUpscalerResult, type ImgUpscalerScale, ImgUpscalerScraper, type ImgUpscalerScraperOptions, type InstagramCarouselItem, type InstagramDownloadAsset, type InstagramDownloadPostInput, type InstagramDownloadProfileInput, type InstagramDownloadResult, type InstagramFeed, type InstagramFeedOptions, type InstagramMediaItem, type InstagramProfile, type InstagramProfileWithFeed, InstagramScraper, type InstagramScraperOptions, JsonParser, type KomikindoDetail, KomikindoScraper, type KomikindoScraperOptions, type KomikindoSearchItem, type LineLayout, type LinearGradientDirection, type LogLevel, type LyricsResult, LyricsScraper, type LyricsScraperOptions, type MConverterConvertResult, MConverterScraper, type MConverterScraperOptions, type MConverterTarget, type MConverterTargetsResult, type MaybePromise, type McAddonDetail, type McAddonResult, McAddonScraper, type McAddonScraperOptions, type McAddonSearchItem, type MediafireResult, MediafireScraper, type MediafireScraperOptions, ModAndroidScraper, type ModAndroidScraperOptions, type ModAndroidSearchResult, type ModyoloItem, type ModyoloResult, type MonthlyChartStyle, type MonthlyPoint, type NormalizedAnimation, type NormalizedBratConfig, type NormalizedPadding, type NormalizedSpotifyAlbum, type NormalizedSpotifyAlbumTrack, type NormalizedSpotifyArtist, type NormalizedSpotifyPlaylist, type NormalizedSpotifyPlaylistTrackItem, type NormalizedSpotifyTrack, type NpmCollaborator, type NpmInfoItem, type NpmPackage, type Nullable, type OcrScanResult, OcrScraper, type OcrScraperOptions, type Optional, type OutputConfig, PLATFORM_DEFAULT_HEADERS, type PaddingConfig, ParseError, type ParsedHtmlMetadata, type PhotoAiCheckResult, PhotoAiScraper, type PhotoAiScraperOptions, type PhotoAiUploadResult, type PinterestBoard, type PinterestDownloadAsset, type PinterestDownloadPinInput, type PinterestDownloadResult, type PinterestImageVariant, type PinterestMedia, type PinterestPageInfo, type PinterestPin, PinterestScraper, type PinterestScraperOptions, type PinterestSearchOptions, type PinterestSearchResult, type PinterestStats, type PinterestStoryBlock, type PinterestStoryPage, type PinterestUser, type PinterestVideoVariant, type PlayStoreApp, PlayStoreScraper, type PlayStoreScraperOptions, type QueueOptions, type RadialGradientPosition, type RenderFrame, RequestQueue, type ResepItem, ResepScraper, type ResepScraperOptions, type ResolvedSpotifyCredentials, type SakuraNovelChapterContent, type SakuraNovelChapterItem, type SakuraNovelDetail, SakuraNovelScraper, type SakuraNovelScraperOptions, type SakuraNovelSearchItem, ScraperError, type ScraperOptions, type SelectedDownload, type SpotifyCredentialSource, type SpotifyCredentialsConfig, type SpotifyDownloadAsset, type SpotifyDownloadAudioFormat, type SpotifyDownloadPostInput, type SpotifyDownloadProfileInput, type SpotifyDownloadResult, type SpotifyEntityType, type SpotifyExtracted, type SpotifyImage, type SpotifyOAuthToken, SpotifyScraper, type SpotifyScraperOptions, type SpotifySearchResult, type SpotifyTrackMeta, StalkScraper, type StalkScraperOptions, type StickerConfig, type StickerTextOptions, type StylePreset, type TextAlign, type TextConfig, type ThreadsBioLink, type ThreadsCaption, type ThreadsDownloadAsset, type ThreadsDownloadPostInput, type ThreadsDownloadProfileInput, type ThreadsDownloadResult, type ThreadsMedia, type ThreadsMediaCandidate, type ThreadsMediaItem, type ThreadsPageInfo, type ThreadsPost, type ThreadsPostInput, type ThreadsProfile, ThreadsScraper, type ThreadsScraperOptions, type ThreadsSearchOptions, type ThreadsSearchResult, type ThreadsStats, type ThreadsTopic, type ThreadsUser, type ThreadsVideoVersion, type Timestamped, type TopAnimeItem, TopAnimeScraper, type TopAnimeScraperOptions, type TwitterCursor, type TwitterDownloadAsset, type TwitterDownloadProfileInput, type TwitterDownloadResult, type TwitterDownloadTweetInput, type TwitterEntities, type TwitterEntityUrl, type TwitterHashtag, type TwitterMedia, type TwitterMention, type TwitterPageInfo, type TwitterProfileDownloadAsset, type TwitterProfileDownloadResult, TwitterScraper, type TwitterScraperOptions, type TwitterSearchOptions, type TwitterSearchResult, type TwitterTweet, type TwitterTweetDetail, type TwitterTweetInput, type TwitterTweetStats, type TwitterUser, type TwitterUserSearchResult, type TwitterUserTimeline, type TwitterUserTimelineInput, type TwitterVideoInfo, type TwitterVideoVariant, UguuScraper, type UguuScraperOptions, type UguuUploadResult, type UpscalerResult, UpscalerScraper, type UpscalerScraperOptions, type UptodownItem, type UptodownResult, ValidationError, type VideoOutputConfig, VideyScraper, type VideyScraperOptions, type VideyUploadResult, type WallpaperItem, type WallpaperResult, WallpaperScraper, type WallpaperScraperOptions, type Webp2Mp4Result, Webp2Mp4Scraper, type Webp2Mp4ScraperOptions, type Webp2Mp4Source, type WeeklyChartStyle, type WeeklyPoint, type WordPos, type WsperCredentials, WsperError, type WsperErrorOptions, type WsperErrorPayload, WsperLogger, type WsperPlatform, type WsperPlatformCredentialsConfig, type WsperResponse, type WsperResponseMeta, WsperScraper, type WsperScraperConfig, type WwCharResult, WwCharScraper, type WwCharScraperOptions, YouTubeScraper, type YouTubeScraperOptions, type YoutubeAudioExtractResult, type YoutubeAudioFormat, type YoutubeAudioFormatId, type YoutubeBasicInfo, type YoutubeChannel, type YoutubeChannelData, type YoutubeDownloadInfo, type YoutubeDownloadResult, type YoutubePlaylistData, type YoutubeSearchResult, type YoutubeStats, type YoutubeThumbnail, type YoutubeUploader, type YoutubeVideoFormat, type YoutubeVideoMetadata, type YtDlpChannel, type YtDlpOptions, type YtDlpStats, type YtDlpUploader, applyBlur, assertNonEmptyString, assertSafeHttpUrl, bratGenerator, buildLayout, buildPlatformHeaders, buildSteps, buildYtDlpSearchQuery, calcAutoFontSize, chartGenerator, clampInteger, convertImage, createErrorResponse, createSpotifyAuthUrl, createSuccessResponse, defaultWarning, demoAnalyticsData, downloadWithYtDlp, drawLayout, enrichTrackWithYtDlp, exchangeSpotifyCodeForToken, exportGif, exportImage, exportJson, exportVideo, extractSpotifyId, extractStatusCode, generateAnalyticsStatsImage, generateBrat, generateChartImage, getAnalyticsChartModels, getDefaultBrowserHeaderProfile, getDefaultUserAgent, getHtmlToJpgDownloadUrl, getRandomBrowserHeaderProfile, getRandomUserAgent, gifToMp4, gifToWebm, imageToSticker, imagesToSticker, isRetryableHttpError, makeCanvas, measureText, mp4ToGif, normalizeConfig, normalizePathfinderTrack, normalizeUrl, normalizeYtDlpDownload, normalizeYtDlpExternalSource, parseAlkitabSearchHtml, parseAndroid1Results, parseAnimeQuoteDetailHtml, parseAnimeQuoteFeedHtml, parseAptoideResults, parseBMKGEarthquakeFeed, parseBMKGForecastXml, parseBMKGNowcasting, parseBiliBiliPlayUrlResponse, parseBiliBiliSearchResponse, parseBiliBiliViewResponse, parseCapCutResolverResponse, parseCuacaSearchLocations, parseCuacaWarning, parseCuacaWeather, parseDrakorDetailHtml, parseDrakorListHtml, parseDramaboxSearchHtml, parseEzgifOutputUrl, parseEzgifUploadForm, parseFaceswapCreateResponse, parseFaceswapPollResponse, parseHokInfoHtml, parseHtmlToJpgCreateJobResponse, parseHtmlToJpgTasks, parseIkiruMangaSearchHtml, parseImgUpscalerStatusResponse, parseImgUpscalerUploadResponse, parseKomikindoDetailHtml, parseKomikindoSearchHtml, parseLyricsDetailHtml, parseLyricsSearchHtml, parseMConverterPollResponse, parseMConverterTargets, parseMConverterUploadResponse, parseMcAddonDetailHtml, parseMcAddonSearchHtml, parseMediafireHtml, parseModyoloResults, parseNpmPackage, parseOcrResultHtml, parseOcrUploadHtml, parsePhotoAiCheckResponse, parsePhotoAiUploadResponse, parsePlayStoreSearchHtml, parseResepSearchHtml, parseSafebooruSearchResponse, parseSakuraNovelChapterHtml, parseSakuraNovelDetailHtml, parseSakuraNovelSearchHtml, parseTopAnimeHtml, parseUguuUploadResponse, parseUpscalerCreateResponse, parseUpscalerResultResponse, parseUptodownResults, parseVideyUploadResponse, parseWallpaperSearchHtml, parseWwCharHtml, refreshSpotifyAccessToken, renderAnimationFrame, renderBackground, renderFrame, resolveUrl, safeFileName, searchYtDlpByTrack, sleep, toWwCharSlug, totalCharCount, totalLineCount, totalWordCount, wrapText, zenFetchSource, zenWafSession };