Skip to main content

Asyncio TikTok data scraping tool

Project description

TikTokPy

Extract data from TikTok without needing any login information or API keys.

Table of Contents

Getting Started

Installation

Install the tiktokapipy package (or add it to your project requirements) and set up Playwright:

pip install tiktokapipy
python -m playwright install

Quick Start Guide

TikTokPy has both a synchronous and an asynchronous API. The interfaces are the same, but the asynchronous API requires awaiting of certain functions and iterators.

Both APIs must be used as context managers. To get video information in both APIs:

Synchronous Asynchronous
from tiktokapipy.api import TikTokAPI

with TikTokAPI() as api:
    video = api.video(video_link)
    ...
from tiktokapipy.async_api import TikTokAPI

async with TikTokAPI() as api:
    video = await api.video(video_link)
    ...

More examples can be found in the documentation.

Warning

Scraping will not always work on the first try. Sporadic network and loading issues could cause extraction to fail. Look at the documentation for the API parameters to see what options can help with this.

Documentation

You can view the full documentation on Read the Docs.

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

tiktokapipy-0.1.1.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

tiktokapipy-0.1.1-py3-none-any.whl (16.5 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