UNPKG

@xbibzlibrary/tiktokscrap

Version:

Powerful TikTok Scraper and Downloader Library

207 lines 4.43 kB
export interface TikTokUser { id: string; uniqueId: string; nickname: string; avatarUrl: string; signature: string; verified: boolean; following: number; fans: number; heart: number; video: number; digg: number; privateAccount: boolean; isSecret: boolean; secUid: string; } export interface TikTokVideo { id: string; text: string; createTime: number; author: TikTokUser; music: { id: string; title: string; author: string; album: string; playUrl: string; coverLarge: string; coverMedium: string; coverThumb: string; duration: number; }; stats: { digg: number; share: number; comment: number; play: number; }; videoMeta: { width: number; height: number; duration: number; cover: string; dynamicCover: string; originCover: string; }; downloadAddr: string; webVideoUrl: string; hashtags: Array<{ id: string; name: string; title: string; cover: string; }>; mentions: Array<{ id: string; uniqueId: string; nickname: string; }>; effects: Array<{ id: string; name: string; icon: string; }>; isAd: boolean; commentsDisabled: boolean; duetEnabled: boolean; stitchEnabled: boolean; secret: boolean; forFriend: boolean; digged: boolean; itemCommentStatus: number; } export interface TikTokPhoto { id: string; text: string; createTime: number; author: TikTokUser; music: { id: string; title: string; author: string; album: string; playUrl: string; coverLarge: string; coverMedium: string; coverThumb: string; duration: number; }; stats: { digg: number; share: number; comment: number; play: number; }; covers: Array<{ url: string; width: number; height: number; }>; webVideoUrl: string; hashtags: Array<{ id: string; name: string; title: string; cover: string; }>; mentions: Array<{ id: string; uniqueId: string; nickname: string; }>; effects: Array<{ id: string; name: string; icon: string; }>; isAd: boolean; commentsDisabled: boolean; duetEnabled: boolean; stitchEnabled: boolean; secret: boolean; forFriend: boolean; digged: boolean; itemCommentStatus: number; } export interface TikTokHashtag { id: string; name: string; title: string; description: string; cover: string; icon: string; viewCount: number; isCommerce: boolean; isAd: boolean; challengeType: number; videos: TikTokVideo[]; } export interface TikTokTrend { id: string; name: string; title: string; desc: string; cover: string; viewCount: number; isCommerce: boolean; isAd: boolean; challengeType: number; videos: TikTokVideo[]; } export interface TikTokComment { id: string; text: string; createTime: number; user: TikTokUser; digg: number; reply: number; isPinned: boolean; isAuthorDigged: boolean; replies: TikTokComment[]; } export interface TikTokSearchOptions { keyword: string; cursor?: number; count?: number; sortType?: 0 | 1 | 2; publishTime?: 0 | 1 | 2 | 3; duration?: 0 | 1 | 2; } export interface TikTokUserFeedOptions { username: string; cursor?: number; count?: number; type?: 'post' | 'like'; } export interface TikTokHashtagFeedOptions { hashtag: string; cursor?: number; count?: number; } export interface TikTokDownloadOptions { outputDir?: string; filename?: string; progressCallback?: (progress: number) => void; } export interface TikTokScrapOptions { timeout?: number; retries?: number; userAgent?: string; proxy?: { host: string; port: number; auth?: { username: string; password: string; }; }; headers?: Record<string, string>; } export interface TikTokScrapResult<T> { success: boolean; data?: T; error?: string; message?: string; } //# sourceMappingURL=index.d.ts.map