2022-11-17 00:45:44 -08:00
2022-11-17 00:45:44 -08:00
2021-11-18 15:07:12 -08:00
2022-09-05 15:29:50 -07:00
2022-11-14 17:40:40 -08:00
2022-05-20 16:35:30 -07:00
2021-11-06 18:35:09 -07:00
2022-11-09 16:59:59 -08:00
2022-08-29 16:02:58 -07:00
2022-08-22 15:39:08 +08:00
2021-11-06 18:35:09 -07:00
2022-04-06 10:48:05 -07:00
2022-11-14 18:40:10 -08:00
2022-11-13 16:39:04 -08:00
2022-11-13 23:13:13 -08:00
2022-10-17 21:08:10 -07:00
2022-11-13 16:10:34 -08:00
2022-11-09 19:19:07 -08:00

Douyin_TikTok_Download_API(抖音/TikTok无水印解析API)

📝运行说明👽API使用🔧手动部署🚧Docker部署📦Docker镜像🧑‍💻贡献者


GitHub licenseGitHub issuesGitHub forksGitHub starsDocker Image size

Language: [English] [Simplified Chinese]

👻Introduction

🚨If you need to use a private server to run this project, please refer to the deployment method[Docker deployment,Manual deployment]

This project is based onPyWebIOFastAPIAIOHTTP, fast asynchronousTik Tok/TikTokData crawling tool, and realize online batch parsing and download of watermark-free videos or atlases through the web terminal, data crawling API, iOS shortcut command without watermark download and other functions. You can deploy or transform this project yourself to achieve more functions, or you can call it directly in your projectscraper.pyor install an existingpip packageAs a parsing library to easily crawl data, etc...

Some simple application scenarios:

Download prohibited videos, perform data analysis, and download without watermark on iOS (withShortcut APP that comes with iOSCooperate with the API of this project to realize in-app download or read clipboard download), etc...

🖥Public Site: I'm vulnerable...please don't hit me at will (·•᷄ࡇ•᷅

**API-V2:**support inputDouyin|TikTokThe user's homepage crawls the author [homepage video data (remove watermark link, liked video list (permission must be public), video comment data, background music video list data, etc...), please check the V2 document for details , the server response time may sometimes become longer, pleasetimeoutSet the value high.

🍔Web APP:https://douyin.wtf/

🍟API-V1:https://api.douyin.wtf/docs

🌭API-V2:https://api-v2.douyin.wtf/docs

💾iOS Shortcut:Shortcut release

📦 Desktop downloader (recommended warehouse):

⚗️Technology stack

scraper.py:

  • Towards[Douyin|TikTok]The API submits requests and retrieves data, returns a dictionary (dict) after processing, and supports asynchronous.

web_api.py:

  • get request parameters and useScraper()After the class processes the data, it returns it in the form of JSON, and the video is downloaded. It can be called quickly with the iOS shortcut command, and supports asynchronous.

web_app.py:

  • forweb_api.pyas well asscraper.pyCreated a simple web program that processes the value entered on the web page and uses itScraper()Class handling and coordinationweb_api.pyThe interface output is on the web page (similar to front-end and back-end separation)

Most of the parameters of the above files can be found inconfig.inimake changes in

💡Project file structure

.
└── Douyin_TikTok_Download_API/
    ├── /static -> (PyWebIO static resources)
    ├── web_app.py -> (Web APP)
    ├── web_api.py -> (API)
    ├── scraper.py -> (Parsing library)
    ├── config.ini -> (configuration file)

💯 Supported features:

  • Douyin (Douyin overseas version: TikTok) video/picture analysis
  • Batch parsing on the webpage (support Douyin/TikTok mixed submission)
  • Batch download of watermark-free videos on the web-side parsing result page (Temporarily removed for V3.0.0)
  • API call to get link data
  • makepip packageEasily and quickly import your projects
  • iOS shortcut command to quickly call APIRealize in-app download of video/atlas without watermark
  • Parse all videos in the author's homepage (API-V2Support Douyin/TikTok)
  • Parse all comments in the video (API-V2Support Douyin/TikTok)

🤦Follow-up features:

  • Welcome to make new suggestions or share your ideas with me in the issue
  • Welcome to submit PR toDevelopment branch♪(・ω・)ノ)

📦 Call parsing library:

💡PyPi:https://pypi.org/project/douyin-tiktok-scraper/

Install the parsing library:pip install douyin-tiktok-scraper

import asyncio
from douyin_tiktok_scraper.scraper import Scraper

api = Scraper()

async def async_test(url: str) -> dict:
    # Hybrid parsing(Douyin/TikTok URL)
    hybrid_data = await api.hybrid_parsing(url)
    print(f"The hybrid parsing result:\n {hybrid_data}")
    return hybrid_data

asyncio.run(async_test(url=input("Paste Douyin/TikTok share URL here: ")))

🗺️ Supported submission formats:

💡Tip: Including but not limited to the following examples, if you encounter link resolution failure, please open a new oneissue

  • Douyin share password (copy in APP)
7.43 pda:/ 让你在几秒钟之内记住我  https://v.douyin.com/L5pbfdP/ 复制此链接打开Dou音搜索直接观看视频
  • Douyin Short URL (Copy in APP)
https://v.douyin.com/L4FJNR3/
  • Douyin normal URL (web version copy)
https://www.douyin.com/video/6914948781100338440
  • Douyin discovery page URL (APP copy)
https://www.douyin.com/discover?modal_id=7069543727328398622
  • TikTok Short URL (In-App Copy)
https://www.tiktok.com/t/ZTR9nDNWq/
  • TikTok normal URL (copy from web version)
https://www.tiktok.com/@evil0ctal/video/7156033831819037994
  • Douyin/TikTok bulk URLs (no need to separate them)
https://v.douyin.com/L4NpDJ6/
https://www.douyin.com/video/7126745726494821640
2.84 nqe:/ 骑白马的也可以是公主%%百万转场变身https://v.douyin.com/L4FJNR3/ 复制此链接打开Dou音搜索直接观看视频

https://www.tiktok.com/t/ZTR9nkkmL/
https://www.tiktok.com/t/ZTR9nDNWq/
https://www.tiktok.com/@evil0ctal/video/7156033831819037994

🛰️API Documentation

💡Tip: You can also view the interface documentation in the code comments of web_api.py

**API-V1 Documentation:**local:http://localhost:8000/docsOnline:https://api.douyin.wtf/docs

**API-V2 Documentation:**Online:https://api-v2.douyin.wtf/docs

API demo:

Check out the documentation for more demos...

💻Deployment (Method 1 Linux)

💡Tip: It is best to deploy this project to a server in the United States, otherwise strange bugs may occur.

[Web]
python3 web_app.py
[API]
python3 web_api.py
  • Program entry:
[Web]
http://localhost:8080
[API]
http://localhost:8000

💽Deployment (Method 2 Docker)

💡Docker Image repo:Docker Hub

  • install docker
curl -fsSL get.docker.com -o get-docker.sh&&sh get-docker.sh &&systemctl enable docker&&systemctl start docker
  • Just leave the config.int and docker-compose.yml files
  • Run the command to let the container run in the background
docker compose up -d
  • View container logs
docker logs -f douyin_tiktok_download_api
  • delete container
docker rm -f douyin_tiktok_download_api
  • renew
docker compose pull && docker compose down && docker compose up -d

❤️ Contributors

📸 Screenshot

API speed test (compared to official API)

🔎点击展开截图

Douyin official API:

API of this project:

TikTok official API:

API of this project:


Project interface

🔎点击展开截图 Web主界面: ![](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/blob/main/Screenshots/v3_screenshots/Home.png?raw=true)

Web main interface:


📜 Star History

Star History Chart

MY License

Start: 2021/11/06 GitHub:@Evil0ctalContact:Evil0ctal1985@gmail.com

Description
🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音、快手、TikTok、Bilibili数据爬取工具,支持API调用,在线批量解析及下载。
Readme Apache-2.0 9.2 MiB
Languages
Python 98.8%
Shell 1%
Dockerfile 0.2%