Usage
Make sure you have read section the first section on how to install the package.
API
- class TiktokScraper(**kwargs)[source]
Instantiates TiktokScraper object used for gathering various Tiktok data
- Variables:
- Returns:
Instantiated object
- Return type:
TiktokScraper
- get_comments(videos, limit_comments=50) List[Comment] [source]
Scrape comments from a specific video. Provide video url(s) or video id(s)
- get_followers_for_user(secUid, limit=5) List[Profile] [source]
Return followers for user. Provide secUid and optional limit
- async get_profile_details(profiles) List[Profile] [source]
Scrape all information regarding a specific profile. Provide profile url(s) or username(s)
- async get_trending_videos(limit_videos=10) List[Video] [source]
Return video ids for current trending videos.
- Returns:
List of video ids of trending videos
- Return type:
- async get_video_details(videos) List[Video] [source]
Scrape all relevant details from a specific video. Provide video urls
Models
- class Comment(**kwargs)[source]
Entails all relevant data concerning a specific comment
- Variables:
- class Profile(**kwargs)[source]
Entails all relevant data concerning a profile
- Variables:
follower_count (int) – Follower count
following_count (int) – Following count
friend_count (int) – Friend count
heart (int) – Heart
heart_count (int) – Heart count
video_count (int) – Video count
commerce_user (bool) – Is commerce user True/False
nickname (str) – Nickname
private_account (bool) – Is private account True/False
signature (str) – Signature
verified (bool) – Is verified True/False
- class Video(**kwargs)[source]
Entails all relevant data concerning a video
- Variables:
video_id (str) – Video ID
description (str) – Description
create_time (int) – Creat time
is_pinned (bool) – Is pinned
music_author (str) – Music author name
music_id (str) – Music id
music_title (str) – Music title
music_url (str) – Music URL
collect_count (int) – Collect count
comment_count (int) – Comment count
digg_count (int) – Digg Count
play_count (int) – Play count
share_count (int) – Share count
download_url (str) – Download URL