docs: Added README."en".md translation via https://github.com/dephraiim/translate-readme

This commit is contained in:
github-actions[bot] 2022-04-06 17:41:28 +00:00
parent baa558eabf
commit f89c4a9349

View File

@ -1,28 +1,39 @@
# welcome`TikTokDownloader_PyWebIO`(Douyin online analysis) # welcome`Douyin_TikTok_Download_API`(Douyin/TikTok no watermark parsing API)
![](https://views.whatilearened.today/views/github/Evil0ctal/TikTokDownloader_PyWebIO.svg)[![GitHub license](https://img.shields.io/github/license/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/LICENSE)[![GitHub issues](https://img.shields.io/github/issues/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/issues)[![GitHub forks](https://img.shields.io/github/forks/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/network)[![GitHub stars](https://img.shields.io/github/stars/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/stargazers) ![](https://views.whatilearened.today/views/github/Evil0ctal/TikTokDownloader_PyWebIO.svg)[![GitHub license](https://img.shields.io/github/license/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/LICENSE)[![GitHub issues](https://img.shields.io/github/issues/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/issues)[![GitHub forks](https://img.shields.io/github/forks/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/network)[![GitHub stars](https://img.shields.io/github/stars/Evil0ctal/TikTokDownloader_PyWebIO)](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/stargazers)
content:[API](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO#%EF%B8%8Fapi%E4%BD%BF%E7%94%A8)[screenshot](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO#%E6%88%AA%E5%9B%BE)[deploy](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO#%E9%83%A8%E7%BD%B2) Language: \[[English](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/blob/main/README.en.md)] \[[Simplified Chinese](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/blob/main/README.md)]
Language: \[[English](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/README.en.md)] \[[Simplified Chinese](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/README.md)] > Note: This API is applicable to Douyin and TikTok. Douyin is TikTok in China. The code of this repository cannot be used for any commercial purpose. You can distribute or modify the code at will, but please mark the original author.
> Note: This API is applicable to Douyin and TikTok. Douyin is TikTok in China. The code in this repository cannot be used for any commercial purpose. You can distribute or modify the code at will, but please mark the original author.
> Note: Words "TikTok" in this readme file mentioned stands for the Chinese version of TikTok.
> AKA \[[douin](https://www.douyin.com/)] or \[[Tik Tok](https://www.douyin.com/)] , The US TikTok is now supported! (no gallery analysis function)
## 👻Introduction ## 👻Introduction
🚀Demo address:<https://douyin.wtf/> 🚀Demo address:<https://douyin.wtf/>
🛰API demo:<https://douyin.wtf/api?url=https://v.douyin.com/R9bQKx4/> 🛰API demo:[https://api.douyin.wtf/](https://douyin.wtf/)
💾iOS Shortcuts:[Click to get instructions](https://www.icloud.com/shortcuts/e8243369340548efa0d4c1888dd3c170)Updated on 2022/02/06 💾iOS Shortcuts:[Click to get instructions](https://www.icloud.com/shortcuts/e8243369340548efa0d4c1888dd3c170)Updated on 2022/02/06
This project uses[PyWebIO](https://github.com/pywebio/PyWebIO)、[Requests](https://github.com/psf/requests)、[Flask](https://github.com/pallets/flask), using Python to implement online batch parsing of Douyin's watermark-free video/atlas. This project uses[PyWebIO](https://github.com/pywebio/PyWebIO)、[Flask](https://github.com/pallets/flask), using Python to implement online batch parsing of Douyin's watermark-free video/atlas.
It can be used to download videos that the author prohibits to download, and can be used with[iOS Shortcuts APP](https://apps.apple.com/cn/app/%E5%BF%AB%E6%8D%B7%E6%8C%87%E4%BB%A4/id915249334)Cooperate with the API of this project to realize in-app download. It can be used to download videos that the author prohibits to download, and can be used with[iOS Shortcuts APP](https://apps.apple.com/cn/app/%E5%BF%AB%E6%8D%B7%E6%8C%87%E4%BB%A4/id915249334)Cooperate with the API of this project to realize in-app download.
The shortcut command needs to be in the Douyin or TikTok app, select the video you want to save, click the share button, and then find the option "Douyin TikTok without watermark download", if you encounter a notification asking whether to allow the shortcut command to access xxxx (domain name) or server), you need to click Allow to use it normally. The shortcut command needs to be in the Douyin or TikTok app, select the video you want to save, click the share button, and then find the option "Douyin TikTok without watermark download", if you encounter a notification asking whether to allow the shortcut command to access xxxx (domain name) or server), you need to click Allow to use it normally.
## 💡Project file structure
.
└── Douyin_TikTok_Download_API/
├── Web/
│ ├── web_zh.py(网页入口)
│ ├── scraper.py(解析库)
│ └── logs.txt(错误日志)
└── API/
├── web_api.py(API)
├── scraper.py(解析库)
└── API_logs.txt(API调用日志)
## 💯 Supported features: ## 💯 Supported features:
- Support Douyin video/atlas parsing - Support Douyin video/atlas parsing
@ -47,17 +58,42 @@ The shortcut command needs to be in the Douyin or TikTok app, select the video y
pip install -r requirements.txt pip install -r requirements.txt
``` ```
- Run TikTok_ZH.py (Python version 3.9 or above) - Web page parsing
```text ```text
python3 TikTok_ZH.py # 运行web_zh.py (测试过的Python版本为3.8)
# python3 TikTok_EN.py - English interface python3 web_zh.py
``` ```
- go to homepage - API
```text ```text
http://localhost(服务器IP):80/ # 运行web_api.py (测试过的Python版本为3.8)
python3 web_api.py
```
- call parsing library
```text
# 将scraper.py拷贝至你的项目目录(测试过的Python版本为3.8)
# 在该项目中导入scraper.py
from scraper import Scraper
api = Scraper()
# 解析Douyin视频/图集(返回字典)
douyin_data = api.douyin('抖音分享口令/链接')
print(douyin_data )
# 解析TikTok视频/图集(返回字典)
tiktok_data = api.tiktok('TikTok分享口令/链接')
print(tiktok_data )
```
- Entrance
```text
网页入口:
http://localhost(服务器IP):5000/
API入口:
http://localhost(服务器IP):2333/
``` ```
## 🗺️ Supported submission formats: ## 🗺️ Supported submission formats:
@ -114,7 +150,7 @@ The API can convert the request parameters into a watermark-free video/picture s
- Parse request parameters - Parse request parameters
```text ```text
http://localhost(服务器IP):80/api?url="复制的(抖音/TikTok)口令/链接" http://localhost(服务器IP):2333/api?url="复制的(抖音/TikTok)口令/链接"
``` ```
- return parameter - return parameter
@ -123,13 +159,33 @@ http://localhost(服务器IP):80/api?url="复制的(抖音/TikTok)口令/链接"
```json ```json
{ {
"Status": "Success", "analyze_time":"1.9043s",
"Type": "Video", "api_url":"https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6918273131559881997",
"video_author": "花花花菜", "nwm_video_url":"http://v3-dy-o.zjcdn.com/23f0dec312ede563bef881af9a88bdc7/624dd965/video/tos/cn/tos-cn-ve-15/eccedcf4386948f5b5a1f0bcfb3dcde9/?a=1128&br=2537&bt=2537&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=sYGC~3E7nz7Th1PZSDXq&l=202204070118030102080650132A21E31F&lr=&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M3hleDRsODlkMzMzaGkzM0ApODpmNWc4ODs5N2lmNzg5aWcpaGRqbGRoaGRmLi4ybnBrbjYuYC0tYy0wc3MtYmJjNTM2NjAtNDFjMzJgOmNwb2wrbStqdDo%3D&vl=&vr=",
"video_author_id": "Wobukunxixi", "original_url":"https://v.douyin.com/L4FJNR3/",
"video_music": "https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/6906830659719383822.mp3", "platform":"douyin",
"video_title": "~猫跟你都想了解", "status":"success",
"video_url": "https://v3-dy-o.zjcdn.com/93e3a68e365ae83f4ce2b2bb9c253489/6191c9c3/video/tos/cn/tos-cn-ve-15/083012c589c842e69f5267803eb8e3a5/?a=1128&br=2262&bt=2262&cd=0%7C0%7C0&ch=96&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=StecAhgM6BMM8b8NDtPDWodpeaQ&l=202111150945070102121380392D1AC2F5&lr=all&mime_type=video_mp4&net=0&pl=0&qs=0&rc=ajh5aTRseW95eTMzNGkzM0ApNjk1OTU6OWVlN2Q7ODo0N2cpaHV2fWVuZDFwekBvbTJjMDVrbmBfLS1eLS9zczRhXi9iLmFgYGBfLy1iLi46Y29zYlxmK2BtYmJeYA%3D%3D&vl=&vr=" "url_type":"video",
"video_author":"Real机智张",
"video_author_id":"Rea1yaoyue",
"video_author_signature":"",
"video_author_uid":"59840491348",
"video_aweme_id":"6918273131559881997",
"video_comment_count":"89145",
"video_create_time":"1610786002",
"video_digg_count":"2968195",
"video_hashtags":[
"百万转场变身"
],
"video_music":"https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/6910889805266504461.mp3",
"video_music_author":"梅尼耶",
"video_music_id":"6910889820861451000",
"video_music_mid":"6910889820861451021",
"video_music_title":"@梅尼耶创作的原声",
"video_play_count":"0",
"video_share_count":"74857",
"video_title":"骑白马的也可以是公主#百万转场变身",
"wm_video_url":"https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0300ffe0000c01a96q5nis1qu5b1u10&ratio=720p&line=0"
} }
``` ```
@ -137,15 +193,40 @@ http://localhost(服务器IP):80/api?url="复制的(抖音/TikTok)口令/链接"
```json ```json
{ {
"Status": "Success", "album_author":"治愈图集",
"Type": "Image", "album_author_id":"ZYTJ2002",
"image_author": "三石壁纸(收徒)", "album_author_signature":"取无水印图",
"image_author_id": "782972562", "album_author_uid":"449018054867063",
"image_music": "https://sf6-cdn-tos.douyinstatic.com/obj/tos-cn-ve-2774/635efafc32694ffbb73fbe60eca4a99d", "album_aweme_id":"7015137063141920030",
"image_title": "#壁纸 #炫酷壁纸 #图集 每一张都是精选", "album_comment_count":"5436",
"image_url": [ "album_create_time":"1633338878",
"https://p3-sign.douyinpic.com/tos-cn-i-0813/4af91199ca154074a8a5a63c3c749c6f~noop.webp?x-expires=1639530000&x-signature=P446eJEt2yuyhf2yb58Be29UpBA%3D&from=4257465056&s=PackSourceEnum_DOUYIN_REFLOW&se=false&sh=&sc=&l=202111150954330102120702320620C75E&biz_tag=aweme_images" "album_digg_count":"193734",
] "album_hashtags":[
"晚霞",
"治愈系",
"落日余晖",
"日落🌄"
],
"album_list":[
"https://p26-sign.douyinpic.com/tos-cn-i-0813/5223757a7bef4f8480cd25d0fa2d2d94~noop.webp?x-expires=1651856400&x-signature=K1VjJdWTHCAaYSz14y6NumjjtfI%3D&from=4257465056&s=PackSourceEnum_DOUYIN_REFLOW&se=false&biz_tag=aweme_images&l=202204070120460102101050412A210A47",
"https://p26-sign.douyinpic.com/tos-cn-i-0813/d99467672da840908acccf2d2b4b7ef7~noop.webp?x-expires=1651856400&x-signature=ncBb8Tt7z4PmpUyiCNr%2FJYnwRSA%3D&from=4257465056&s=PackSourceEnum_DOUYIN_REFLOW&se=false&biz_tag=aweme_images&l=202204070120460102101050412A210A47",
"https://p26-sign.douyinpic.com/tos-cn-i-0813/5c2562210b1a4d4c99d6d4dbd2f23f2b~noop.webp?x-expires=1651856400&x-signature=Rsmplb53IKfvKd3mmIb4iQNhlIE%3D&from=4257465056&s=PackSourceEnum_DOUYIN_REFLOW&se=false&biz_tag=aweme_images&l=202204070120460102101050412A210A47",
"https://p26-sign.douyinpic.com/tos-cn-i-0813/9bb74c0c6aff4217bd1491a077b2c817~noop.webp?x-expires=1651856400&x-signature=BLRyHoKP0ybIci57yneOca62dxI%3D&from=4257465056&s=PackSourceEnum_DOUYIN_REFLOW&se=false&biz_tag=aweme_images&l=202204070120460102101050412A210A47"
],
"album_music":"https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/6978805801733442341.mp3",
"album_music_author":"魏同学",
"album_music_id":"6978805810365271000",
"album_music_mid":"6978805810365270791",
"album_music_title":"@魏同学创作的原声",
"album_play_count":"0",
"album_share_count":"30717",
"album_title":"“山海自有归期 风雨自有相逢 意难平终将和解 万事终将如意”#晚霞 #治愈系 #落日余晖 #日落🌄",
"analyze_time":"1.0726s",
"api_url":"https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=7015137063141920030",
"original_url":"https://v.douyin.com/Nb8jysN/",
"platform":"douyin",
"status":"success",
"url_type":"album"
} }
``` ```
@ -153,64 +234,89 @@ http://localhost(服务器IP):80/api?url="复制的(抖音/TikTok)口令/链接"
```JSON ```JSON
{ {
"Status":"Success", "analyze_time":"5.0863s",
"Type":"Video", "nwm_video_url":"https://v19.tiktokcdn-us.com/cfa357dadd8f913f013a6d0b0dca293f/624e20fa/video/tos/useast5/tos-useast5-ve-0068c003-tx/3296231486014755a1b81aa70c349a53/?a=1233&br=6498&bt=3249&cd=0%7C0%7C0%7C3&ch=0&cr=3&cs=0&cv=1&dr=0&ds=6&er=&ft=bY1KJnB4TJBS6BMy-L1iVKP&l=20220406172333010113135214232FAB56&lr=all&mime_type=video_mp4&net=0&pl=0&qs=0&rc=MzpsaGY6Zjo7PDMzZzczNEApNjY6ZTtkOzxpN2Q3PDo5OmdgZ2BtcjQwai9gLS1kMS9zczJhLTEzYjEuMTJeXzQyLmM6Yw%3D%3D&vl=&vr=",
"followerCount":18, "original_url":"https://www.tiktok.com/@oregonzoo/video/7080938094823738666",
"followingCount":18, "platform":"tiktok",
"likes_recived":3000000, "status":"success",
"music_author":"❁ちゅらる❁", "url_type":"video",
"music_title":"オリジナル楽曲 - ♛", "video_author":"oregonzoo",
"original_url":"https://vm.tiktok.com/TTPdkQvKjP/", "video_author_SecId":"MS4wLjABAAAArWNQ8-AZN6CxWOkqdeWsMBUuLDmJt8TWUAk0S4aWDW5V5EoqRbuczhaLnxJHCGob",
"video_author":"nemi__goro", "video_author_diggCount":94,
"video_author_id":"78903680178", "video_author_followerCount":1800000,
"video_count":203, "video_author_followingCount":39,
"video_music":"https://sf16-ies-music-sg.tiktokcdn.com/obj/tiktok-obj/6967616110887701250.mp3", "video_author_heartCount":29700000,
"video_title":"#ベルメイク", "video_author_id":"6699816060206171141",
"video_url":"https://v16m.tiktokcdn.com/65824a4bba45fbf4691d1ea2d040d2cc/6200e22c/video/tos/alisg/tos-alisg-pve-0037/6799cebe4a2248b98828788c94964a57/?a=1233&br=4118&bt=2059&cd=0%7C0%7C0%7C3&ch=0&cr=3&cs=0&cv=1&dr=0&ds=3&er=&ft=CvjiQnB4TJBS6BMyjOYNVKP&l=20220207031102010223065036144769B6&lr=all&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M3NtaTo6Zjc5OTMzODgzNEApOWVmaTtlZDs7N2VlNjc8N2dzMjAzcjRfXzZgLS1kLy1zcy8wMS0uXi8uLjY2YGFjYDE6Yw%3D%3D&vl=&vr=", "video_author_nickname":"Oregon Zoo",
"water_mark_url":"https://v16-webapp.tiktok.com/233cec8c26b1a7d46fb6caaf5b354621/6200efc0/video/tos/alisg/tos-alisg-pve-0037/a00cfbcc79f54b66824aac6a871777c8/?a=1988&br=3506&bt=1753&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XOQ9-3E7nz7ThxPVoDXq&l=202202070408580102231230340B4C6876&lr=tiktok&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M3NtaTo6Zjc5OTMzODgzNEApO2k8aTw0M2Q0N2VoZ2VoOWdzMjAzcjRfXzZgLS1kLy1zc19eYWJgY2E0MmFjMjY2MWE6Yw%3D%3D&vl=&vr=" "video_author_videoCount":264,
"video_aweme_id":"7080938094823738666",
"video_comment_count":61,
"video_create_time":"1648659375",
"video_digg_count":11800,
"video_hashtags":[
"redpanda",
"boop",
"sunshine"
],
"video_music":"https://sf16.tiktokcdn-us.com/obj/ies-music-tx/7075363935741856558.mp3",
"video_music_author":"Gilderoy Dauterive",
"video_music_id":"7075363884613356330",
"video_music_title":"Be the Sunshine",
"video_music_url":"https://sf16.tiktokcdn-us.com/obj/ies-music-tx/7075363935741856558.mp3",
"video_play_count":60100,
"video_ratio":"720p",
"video_share_count":298,
"video_title":"Moshu ✨ #redpanda #boop #sunshine",
"wm_video_url":"https://v16m-webapp.tiktokcdn-us.com/0394b9183a5852d4392a7e804bf78c55/624e20f6/video/tos/useast5/tos-useast5-ve-0068c001-tx/fc63ae232e70466398b55ccf97eb3c67/?a=1988&br=6468&bt=3234&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XY53A3E7nz7Th-pZSDXq&l=202204061723290101131351171341B9BB&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=MzpsaGY6Zjo7PDMzZzczNEApOjo4aDMzZmRlN2loOWk6ZWdgZ2BtcjQwai9gLS1kMS9zczBhNGA0LTIwNjNiYDQ2YmE6Yw%3D%3D&vl=&vr="
} }
``` ```
- Download video request parameters - Download video request parameters
```text ```text
http://localhost(服务器IP):80/video?url="复制的(抖音/TikTok)口令/链接" http://localhost(服务器IP):2333/video?url="复制的(抖音/TikTok)口令/链接"
#返回mp4文件 # 返回无水印mp4文件
# 大量请求时很吃服务器内存,容易崩,慎用。
``` ```
- Download audio request parameters - Download audio request parameters
```text ```text
http://localhost(服务器IP):80/bgm?url="复制的(抖音/TikTok)口令/链接" http://localhost(服务器IP):2333/music?url="复制的(抖音/TikTok)口令/链接"
# 返回mp3文件 # 返回mp3文件
# 大量请求时很吃服务器内存,容易崩,慎用。
``` ```
* * * * * *
## 💾Deploy ## 💾Deploy
> It is best to deploy this project to an overseas server, otherwise strange problems may occur > Note:
> The screenshots may not match the text due to update problems, please refer to the text description first.
> It is best to deploy this project to an overseas server, otherwise strange problems may occur.
For example: the project is deployed on a domestic server, and the person is in the United States, click the link of the result page and report an error 403, which is visually related to Douyin CDN. For example: the project is deployed on a domestic server, and the person is in the United States, click the link of the result page and report an error 403, which is visually related to Douyin CDN.
> Deploy using the Pagoda Linux panel > Deploy using the Pagoda Linux panel
- First go to the security group to open port 5000 (default 5000, which can be modified at the bottom of the file.) - First go to the security group to open ports 5000 and 2333 (default 5000 for web, 2333 for API default, which can be modified at the bottom of the file.)
- Search for python in the pagoda app store and install the project manager - Search for python in the pagoda app store and install the project manager (version 1.9 is recommended)
![](https://raw.githubusercontent.com/Evil0ctal/TikTokDownloader_PyWebIO/main/Screenshots/BT_Linux_Panel_Deploy_1.png) ![](https://raw.githubusercontent.com/Evil0ctal/TikTokDownloader_PyWebIO/main/Screenshots/BT_Linux_Panel_Deploy_1.png)
* * * * * *
- Create a project with an arbitrary name - Create a project with an arbitrary name
- 路径选择你上传文件的路径 - Path select the path where you upload the file
- Python version needs to be at least 3 or more (install it yourself in the version management on the left) - Python version needs to be at least 3 or more (install it yourself in the version management on the left)
- The frame is modified to`Flask` - The frame is modified to`Flask`
- The startup method is changed to`python` - The startup method is changed to`python`
- Startup file selection`TikTok_ZH.py` - Web startup file selection`web_zh.py`
- API startup file selection`web_api.py`
- Check install module dependencies - Check install module dependencies
- Start at will - Start at will
- If the pagoda is installed`Nginx`wait for the application to stop it or`TikTok_ZH.py`Modify the port at the bottom (the default port is 5000) - If the pagoda runs`Nginx`When waiting for other services, please judge by yourself whether the port is occupied. The running port can be modified at the bottom of the file.
![](https://raw.githubusercontent.com/Evil0ctal/TikTokDownloader_PyWebIO/main/Screenshots/BT_Linux_Panel_Deploy_2.png) ![](https://raw.githubusercontent.com/Evil0ctal/TikTokDownloader_PyWebIO/main/Screenshots/BT_Linux_Panel_Deploy_2.png)
@ -218,6 +324,9 @@ For example: the project is deployed on a domestic server, and the person is in
## 🎉 Screenshot ## 🎉 Screenshot
> Note:
> The screenshots may not match the text due to update problems, please refer to the text description first.
- Main interface - Main interface
![](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/Screenshots/home.png) ![](https://github.com/Evil0ctal/TikTokDownloader_PyWebIO/blob/main/Screenshots/home.png)