UNPKG

@riqtu/tiktok-scraper

Version:

Modified TikTok Scraper with proxy support

17 lines (16 loc) 800 B
import { IParsed, ITiktokOptions } from "./parser/type"; import { Aweme } from "./types"; /** * Fetches a TikTok video or user profile based on the provided URL. * * @param url - The URL of the TikTok video or user profile. * @param options - Optional configuration options for the TikTok request. * @returns A Promise that resolves to an array of Aweme objects, a full IParsed object, or a Partial<IParsed> if keys are specified. * @throws An error if fetching fails or the aweme is not found. */ declare function Tiktok<T extends ITiktokOptions>(url: string, options?: T): Promise<TiktokRsp<T>>; export type TiktokRsp<T extends ITiktokOptions> = IParsed & Partial<Pick<Aweme, T extends { parse: true; keys: Array<keyof Aweme>; } ? T["keys"][number] : never>>; export default Tiktok;