SuperAPI AI Directory

yichen-douyin-fetcher

Testing & quality

View repository

Updated 10-16 00:22

About this skill

Douyin Fetcher

Douyin video download skill, uses Playwright to control the browser and intercept API responses, bypasses Douyin's msToken/X-Bogus signature verification, and obtains the watermark-free video direct link and downloads it.

Core method

  1. Launch headless Chromium (Playwright)
  2. Visit the Douyin video page
  3. Intercept aweme/detail API response
  4. Extract from the JSON response play_addr.url_list[0](watermark-free direct link)
  5. Download with requests, with Referer to simulate the browser source

How to use

Download a single video

The user provides a Douyin link (the following formats are supported):

  • https://www.douyin.com/video/7611845735025364265
  • https://www.douyin.com/jingxuan?modal_id=7611845735025364265
  • Any video URL under douyin.com

Run the script

Run the download script:

python3 yichen-douyin-fetcher/scripts/download.py "<抖音链接>" [输出路径]

Parameter description:

  • Douyin link (required): video page URL
  • Output path (optional): local save path, defaults to ~/Downloads/douyin_<video_id>.mp4
  • --metadata-only(optional): only scrape metadata, do not download the video, used to quickly check whether the link can be parsed
  • --timeout 60(optional): wait aweme/detail seconds for the response

Example:

python3 yichen-douyin-fetcher/scripts/download.py "https://www.douyin.com/video/7611845735025364265"
python3 yichen-douyin-fetcher/scripts/download.py "https://www.douyin.com/video/7611845735025364265" "/tmp/my_video.mp4"
python3 yichen-douyin-fetcher/scripts/download.py "https://www.douyin.com/video/7611845735025364265" --metadata-only

Output information

After a successful download, returns:

  • Video title (desc)
  • Video size (MB)
  • Save path
  • Author information
  • Generates in the same directory <视频文件名>.metadata.json, containing concise metadata such as title, author, publish time, duration, and interaction data

Dependencies

  • Python 3.9+
  • playwright (pip install playwright; if Chromium is missing on first run, the script will automatically execute python3 -m playwright install chromium)
  • requests

Notes

  • The video link must contain a valid video_id
  • Recommended page links need to be converted to the video detail page format (/video/ prefix)
  • The downloaded video is in watermark-free MP4 format
  • Some videos may fail to download due to copyright or regional restrictions
  • This skill is only responsible for scraping the video and metadata; when a spoken script is needed, continue calling yichen-volc-asr for transcription