
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
douyin-downloader
Advanced tools
一個基於 Node.js 和 Puppeteer 的命令列工具,用於解析和下載抖音 (Douyin) 影片,並獲取影片及用戶資訊。
--verbose) 以方便調試。確保您的系統已安裝 Node.js (建議版本 >= 20.0.0) 和 npm。
npm install -g douyin-downloader
或者,如果您不想全域安裝,可以使用 npx:
npx dydl <命令> [選項]
douyin-downloader 提供了一個名為 dydl 的命令列介面。
dydl <命令> [選項] [參數]
login: 登入抖音帳號並儲存 Cookie。
dydl login
執行後會開啟瀏覽器顯示 QR Code,請使用抖音 App 掃描登入。Cookie 將儲存於預設路徑。
check: 檢查已儲存的 Cookie 是否有效。
dydl check
open: 開啟一個已載入 Cookie 的瀏覽器實例。
dydl open
video <影片連結>: 下載單個影片。
# 下載影片到目前目錄
dydl video https://v.douyin.com/xxxxxxx/
# 指定下載目錄
dydl video -d ./downloads https://v.douyin.com/xxxxxxx/
# 指定下載目錄和檔案名稱 (注意: -f 僅適用於單個影片下載)
dydl video -d ./downloads -f my_video.mp4 https://v.douyin.com/xxxxxxx/
info <影片連結>: 獲取影片資訊。
# 輸出資訊到控制台
dydl info https://v.douyin.com/xxxxxxx/
# 輸出資訊到 JSON 檔案
dydl info -f video_info.json https://v.douyin.com/xxxxxxx/
list <用戶主頁連結>: 獲取用戶影片列表。
# 獲取用戶所有影片列表並輸出到控制台
dydl list https://www.douyin.com/user/MS4wLjABAAAAxxxxxxxxxxxxxxxx
# 獲取用戶最新的 10 個影片列表
dydl list -n 10 https://www.douyin.com/user/MS4wLjABAAAAxxxxxxxxxxxxxxxx
# 獲取用戶影片列表並輸出到 JSON 檔案
dydl list -f user_videos.json https://www.douyin.com/user/MS4wLjABAAAAxxxxxxxxxxxxxxxx
-v, --verbose: 顯示詳細日誌輸出。-h, --help: 顯示幫助訊息。部分功能 (如下載某些受限影片或獲取完整的用戶列表) 可能需要登入狀態。使用 dydl login 命令登入後,Cookie 會被儲存。工具在執行需要驗證的操作時會自動載入儲存的 Cookie。您可以使用 dydl check 來確認 Cookie 的有效性。
Cookie 預設儲存路徑會根據您的作業系統而有所不同 (通常在用戶設定或應用程式資料目錄下)。
本專案採用 MIT 授權條款。
歡迎提交 Issue 或 Pull Request。
免責聲明: 本工具僅供學習和技術研究使用,請勿用於非法用途或侵犯版權。下載的內容版權歸原作者所有。
FAQs
The npm package douyin-downloader receives a total of 13 weekly downloads. As such, douyin-downloader popularity was classified as not popular.
We found that douyin-downloader 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.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.