Skip to main content

Unoffiical Python 3 TikTok API Wrapper.

Project description

PyTok - Python 3 TikTok API Wrapper

PyTok is the latest python API wrapper for tiktok. More flexibility, more data, more enagement.

Installation

Use the package manager pip to install PyTok.

pip install PyTok

Usage

import PyTok as pt
import json

#Full Scrape - Return all user data.

# returns '{"Followers": 3183, "Likes": "247200", "Video Views": 3079200}'
No_Comments = json.loads(pt.full_scrape('reddit_a.i.t.a', comments=False))

#*COMMENTS CAN TAKE A LONG TIME TO LOAD DEPENDING ON # of VIDEOS*
# returns full_scrape + comments + comment likes. 
#'{"Followers": 3183, "Likes": "247200", "Video Views": 3079200, "Comments": {'Example Comment': 1}}'
# min_likes will default to 0 to show all comments. Comments with likes > or = to the min_likes will return.
With_Comments = pt.full_scrape('reddit_a.i.t.a', comments=True, min_likes=1)


#Individual Scrape - Return individual user data.

# returns 247300.
pt.get_likes("reddit_a.i.t.a")
No_Comments['Likes']

# returns 3183.
pt.get_followers('reddit_a.i.t.a')
No_Comments['Followers']

# returns 3079200.
pt.get_video_views('reddit_a.i.t.a')
No_Comments['Video Views']

#*COMMENTS CAN TAKE A LONG TIME TO LOAD DEPENDING ON # of VIDEOS*
# returns "Comments": {'Example Comment': 1}
pt.get_video_views('reddit_a.i.t.a')
No_Comments['Comments']

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Credits

All rights reserved by John Sandoval. Creator of PyTok 2022.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyTok-1.0.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

PyTok-1.0.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page