Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudoguy/tiktokpy
Tool for automated TikTok interactions
https://github.com/sudoguy/tiktokpy
tiktok tiktok-api tiktok-python tiktok-scraper tiktokbot
Last synced: 3 months ago
JSON representation
Tool for automated TikTok interactions
- Host: GitHub
- URL: https://github.com/sudoguy/tiktokpy
- Owner: sudoguy
- License: mit
- Created: 2020-06-05T16:00:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T00:01:20.000Z (3 months ago)
- Last Synced: 2024-11-05T01:16:58.517Z (3 months ago)
- Topics: tiktok, tiktok-api, tiktok-python, tiktok-scraper, tiktokbot
- Language: Python
- Homepage:
- Size: 344 KB
- Stars: 732
- Watchers: 49
- Forks: 151
- Open Issues: 71
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TikTokPy
Tooling that automates your social media interactions to βfarmβ Likes and Followers on TikTok---
## Quickstart.py
```python
import asyncio
from tiktokpy import TikTokPyasync def main():
async with TikTokPy() as bot:
# Do you want to get trending videos? You can!
trending_items = await bot.trending(amount=5)for item in trending_items:
# β€οΈ you can like videos
await bot.like(item)
# or unlike them
await bot.unlike(item)
# or follow users
await bot.follow(item.author.username)
# as and unfollow
await bot.unfollow(item.author.username)# π getting user's feed
user_feed_items = await bot.user_feed(username="tiktok", amount=5)for item in user_feed_items:
# π§ get music title, cover, link, author name..
print("Music title: ", item.music.title)
# #οΈβ£ print all tag's title of video
print([tag.title for tag in item.challenges])
# π check all video stats
print("Comments: ", item.stats.comments)
print("Plays: ", item.stats.plays)
print("Shares: ", item.stats.shares)
print("Likes: ", item.stats.likes)# and many other things π
asyncio.run(main())
```## Installation
Install with pip:
```shell
pip install tiktokpy
```Install browser by playwright
```shell
playwright install firefox
```## Run
To create your cookies and settings.toml file simply run
```shell
python quicklogin.py
```
and then after you login run```shell
python quickstart.py
```