Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
douyin-tiktok-scraper
Advanced tools
本项目是基于 PyWebIO,FastAPI,AIOHTTP,快速异步的抖音/TikTok数据爬取工具,并通过Web端实现在线批量解析以及下载无水印视频或图集,数据爬取API,iOS快捷指令无水印下载等功能。你可以自己部署或改造本项目实现更多功能,也可以在你的项目中直接调用scraper.py或安装现有的pip包作为解析库轻松爬取数据等.....
一些简单的运用场景:
下载禁止下载的视频,进行数据分析,iOS无水印下载(搭配iOS自带的快捷指令APP 配合本项目API实现应用内下载或读取剪贴板下载)等.....
API-V2: 支持输入
Douyin|TikTok
用户主页爬取该作者[主页视频数据(去水印链接, 已点赞视频列表(权限需为公开), 视频评论数据, 背景音乐视频列表数据, 等等...), 详细信息请查看V2文档, 服务器响应时间有时会变长, 使用时请将timeout
值设高.
🍔Web APP: https://douyin.wtf/
🍟API-V1: https://api.douyin.wtf/docs
🌭API-V2: https://api-v2.douyin.wtf/docs
💾iOS Shortcut(快捷指令): Shortcut release
📦️桌面端下载器(仓库推荐):
scraper.py:
web_api.py:
Scraper()
类处理数据后以JSON形式返回,视频下载,配合iOS快捷指令实现快速调用,支持异步。web_app.py:
web_api.py
以及scraper.py
制作的简易Web程序,将网页输入的值进行处理后使用Scraper()
类处理并配合web_api.py
的接口输出在网页上(类似前后端分离)以上文件的参数大多可在config.ini中进行修改
.
└── 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)
💡欢迎提出新的建议或将你的思路在issue中与我分享,或直接提交PR至Development分支 ♪(・ω・)ノ)
安装解析库:pip install douyin-tiktok-scraper
import asyncio
from douyin_tiktok_scraper.scraper import Scraper
api = Scraper()
async def hybrid_parsing(url: str) -> dict:
# Hybrid parsing(Douyin/TikTok URL)
result = await api.hybrid_parsing(url)
print(f"The hybrid parsing result:\n {result}")
return result
asyncio.run(hybrid_parsing(url=input("Paste Douyin/TikTok share URL here: ")))
💡提示:包含但不仅限于以下例子,如果遇到链接解析失败请开启一个新 issue
7.43 pda:/ 让你在几秒钟之内记住我 https://v.douyin.com/L5pbfdP/ 复制此链接,打开Dou音搜索,直接观看视频!
https://v.douyin.com/L4FJNR3/
https://www.douyin.com/video/6914948781100338440
https://www.douyin.com/discover?modal_id=7069543727328398622
https://www.tiktok.com/t/ZTR9nDNWq/
https://www.tiktok.com/@evil0ctal/video/7156033831819037994
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
💡提示:也可以在web_api.py的代码注释中查看接口文档
API-V1文档: 本地:http://localhost:8000/docs 在线:https://api.douyin.wtf/docs
API-V2文档: 在线:https://api-v2.douyin.wtf/docs
API演示:
https://api.douyin.wtf/api?url=[视频链接/Video URL]&minimal=false
https://api.douyin.wtf/download?url=[视频链接/Video URL]&prefix=true&watermark=false
[抖音]
原始链接:
https://www.douyin.com/video/7159502929156705567
替换域名:
https://api.douyin.wtf/video/7159502929156705567
# 返回无水印视频下载响应
[TikTok]
original link:
https://www.tiktok.com/@evil0ctal/video/7156033831819037994
Replace Domain:
https://api.douyin.wtf/@evil0ctal/video/7156033831819037994
# Return No Watermark Video Download Response
更多演示请查看文档内容......
💡提示:最好将本项目部署至美国地区的服务器,否则可能会出现奇怪的BUG。
进程守护
或手动安装supervisord
:[宝塔面板]
https://www.bt.cn/new/download.html
[aapanel]
https://www.aapanel.com/new/download.html
[Supervisor]
http://supervisord.org/installing.html
pip install -r requirements.txt
supervisord
守护进程[Web]
python3 web_app.py
[API]
python3 web_api.py
[Web]
http://localhost:8080
[API]
http://localhost:8000
💡Docker Image repo: Docker Hub
curl -fsSL get.docker.com -o get-docker.sh&&sh get-docker.sh &&systemctl enable docker&&systemctl start docker
docker compose up -d
docker logs -f douyin_tiktok_download_api
docker rm -f douyin_tiktok_download_api
docker compose pull && docker compose down && docker compose up -d
API速度测试(对比官方API)
抖音官方API:
本项目API:
TikTok官方API:
本项目API:
项目界面
Web主界面:
Web main interface:
Start: 2021/11/06 GitHub: @Evil0ctal Contact: Evil0ctal1985@gmail.com
FAQs
Douyin/TikTok async data scraper.
We found that douyin-tiktok-scraper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.