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.1.tar.gz
(11.7 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.1.tar.gz.
File metadata
- Download URL: tiktok_collector-0.6.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33ea20a3add260e198c57a4494c02dc736850fb3ca2fb3fcdb82687a30b03668
|
|
| MD5 |
b440021d6ae653df6456e4e93bfed305
|
|
| BLAKE2b-256 |
8770d1bace0dc85530fe41ef38e464a98ae1937042a50cb1f04a4aacb0f72f64
|
File details
Details for the file tiktok_collector-0.6.1-py3-none-any.whl.
File metadata
- Download URL: tiktok_collector-0.6.1-py3-none-any.whl
- Upload date:
- Size: 20.6 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 |
b085cec088035e5da8f057a888a8670ae480cf2619698e1f49e411c965ebb423
|
|
| MD5 |
e774d5bfe6b753225ffc839a118a2532
|
|
| BLAKE2b-256 |
a347e814a65f55439cbb361ffbc0b4b95731f4b42111fb12ddc66f160f5a0f8a
|