UNPKG

abot-scraper

Version:

scraper random for downloader and searching

117 lines (100 loc) 2.78 kB
interface ApiResponse<T = unknown> { creator: string; status: number | boolean; result?: T; msg?: string; } interface FacebookResult { thumbnail: string; videoUrl: string; } interface TikTokResult { title: string; video: string; audio: string; } interface InstagramUserInfo { username: string; [key: string]: unknown; } interface InstagramStoriesResult { user_info: InstagramUserInfo; links: string[]; } interface InstagramMediaItem { type: "video" | "image"; url: string; preview?: string; } interface SfileSearchResult { title: string; size: string; link: string; } interface WallpaperResult { title: string; type: string; source: string; image: string[]; } interface WikimediaResult { title: string; source: string; image: string; } interface YtSearchResult { title: string; thumbnail: string; url: string; } interface YoutubeResultV2 { title: string; thumbnail: string | null; downloadLinks: Record<string, string>; video: string | null; audio: string | null; formats: unknown[]; } interface SfileDownloadResult { filename: string; mimetype: string; download: string; } declare global { var creator: string; } declare class Downloader { private generator; constructor(); facebookDownloader(url: string): Promise<ApiResponse<FacebookResult>>; tiktokDownloader(url: string): Promise<ApiResponse<TikTokResult>>; instagramDownloader(url: string): Promise<ApiResponse<InstagramMediaItem[]>>; ytMp3Downloader: (url: string) => Promise<unknown>; youtubeDownloader(url: string): Promise<ApiResponse<YoutubeResultV2>>; sfileDownloader(url: string): Promise<ApiResponse<SfileDownloadResult>>; } declare global { var creator: string; } declare class Search { igStory(username: string): Promise<ApiResponse<InstagramStoriesResult>>; sfileSearch(query: string, page?: number): Promise<ApiResponse<SfileSearchResult[]>>; ytSearch(query: string): Promise<ApiResponse<YtSearchResult[]>>; wallpaper: (title: string, page?: string) => Promise<ApiResponse<WallpaperResult[]>>; wikimedia: (title: string) => Promise<ApiResponse<WikimediaResult[]>>; } declare class Tools { removeBackground: (image: Buffer) => Promise<unknown>; reminiV2: (buffer: Buffer) => Promise<unknown>; reminiV1: (buffer: Buffer) => Promise<unknown>; uploadImage: (buffer: Buffer) => Promise<unknown>; } declare const downloader: Downloader; declare const search: Search; declare const tools: Tools; declare const _default: { downloader: Downloader; search: Search; tools: Tools; }; export { Downloader, Search, Tools, _default as default, downloader, search, tools };