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
Release history Release notifications | RSS feed
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.5.tar.gz
(13.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiktok_collector-0.6.5.tar.gz.
File metadata
- Download URL: tiktok_collector-0.6.5.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
695004c9037e9e0014c0793743ba2f28df2d71acd1c59a74b1d4724fbf57ab6e
|
|
| MD5 |
edb834fd432159b0fa18e2f8a4aa79bd
|
|
| BLAKE2b-256 |
660a66f1603d8b78a3bb13168a7821bbd8fcba9084e78eff327eb239e2115295
|
File details
Details for the file tiktok_collector-0.6.5-py3-none-any.whl.
File metadata
- Download URL: tiktok_collector-0.6.5-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65d019ac12551b63cdfc6162915a188de1e7e7ed48f7828a42830b5fd667e588
|
|
| MD5 |
ed8828fc6116af288e3a0b691bd2e288
|
|
| BLAKE2b-256 |
0de1c38ee4ba0d4e4c3b656e3aa94b2ef24af2506097450185b27980d87ffe50
|