Skip to main content

A Python library for collecting TikTok data

Project description

TikTok Collector

A Python library for collecting TikTok data including hashtags and keywords.

Installation

pip install tiktok-collector

Features

  • Collect TikTok posts by hashtag
  • Collect TikTok posts by keyword
  • Collect TikTok Comment by post link
  • Configurable API settings
  • Rate limiting and error handling

Usage

Basic Usage

from tiktok_collector import TiktokHashtagCollector, SparkS3Writer

# Initialize collector
collector = TiktokHashtagCollector(api_key="your_rapidapi_key")

# Collect posts by hashtag
posts = collector.collect_by_hashtag(
    hashtag="python",
    max_posts=100,
    min_likes=1000
)

# Collect posts by keyword


### Configuration

You can configure the collector using environment variables:

```bash
export TIKTOK_API_KEY=your_rapidapi_key
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_REGION=us-east-1

Requirements

  • Python 3.7+
  • requests
  • pandas
  • numpy
  • python-dotenv
  • boto3
  • pytz
  • httplib2
  • sqlalchemy
  • openpyxl
  • pyspark
  • hadoop-aws
  • aws-java-sdk-bundle

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

tiktok_collector-0.6.6.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tiktok_collector-0.6.6-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file tiktok_collector-0.6.6.tar.gz.

File metadata

  • Download URL: tiktok_collector-0.6.6.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for tiktok_collector-0.6.6.tar.gz
Algorithm Hash digest
SHA256 5453213be6be558daf8ca3aa743286fd2d3823f56a7935052f9bb224e5569750
MD5 41c787782199c1bc5d44879e0d4adaae
BLAKE2b-256 b8ae987c774c8a3de6fab69b1d29cdadddc3eafc16227e2f9ae7af4bdca6df21

See more details on using hashes here.

File details

Details for the file tiktok_collector-0.6.6-py3-none-any.whl.

File metadata

File hashes

Hashes for tiktok_collector-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a6741e09d70fdf210f28b82e0cb9cbc561324d30fdada0d4e138b988d03ceb0c
MD5 96e5a085261e5dc78128b871f8b8c068
BLAKE2b-256 0559f37c0f802c118c68a413f2cfcc847428b9635c0ad37f22a0c23f0b0c264d

See more details on using hashes here.

Supported by

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