Skip to content

lyx2022518/videodl

 
 

Repository files navigation


📄 Documents: https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip

🌌 VideoDL Live Status Dashboard (VideoDL有效性实时监测)
Auto-updated every day via GitHub Actions, with ~3 randomly sampled preview clips.

demo

🆕 What's New

  • 2025-11-29: Released videofetch v0.2.3 - add support for FoxNewsVideoClient and SinaVideoClient, and introduce N_m3u8DL-RE to improve the download speed of HLS/m3u8 streams.
  • 2025-11-28: Released videofetch v0.2.2 - added video parsing support for multiple platforms, and fixed a multithreading bug in the download progress bar along with several minor issues.
  • 2025-11-26: Released videofetch v0.2.1 - add/fix support for more video platforms and perform some code optimizations.
  • 2025-11-21: Released videofetch v0.2.0 - code refactored and extensive support added for downloading videos from many additional platforms.

🚀 Introduction

A fast and lightweight video downloader built entirely in Python! 🚀 If you find this project useful, don't forget to star the repository and help us grow—your support means the world! 🙌

📜 Statement

This repository is created solely for learning purposes (commercial use is prohibited). All APIs used here are sourced from public networks. If you wish to download paid videos, please ensure you have a paid membership on the respective video platform (respect copyright, please!). If any content in this repository causes concerns or infringes on copyright, please reach out to me, and I’ll promptly remove it.

🎥 Supported Video Client

The video platforms currently supported for parsing are,

VideoClient (EN) VideoClient (CN) WeChat Article Search ParseURL Download Core Code
AcFunVideoClient A站 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
PipigaoxiaoVideoClient 皮皮搞笑 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
PipixVideoClient 皮皮虾 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
HaokanVideoClient 好看视频 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
TedVideoClient TED视频 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
Ku6VideoClient 酷6网 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
BilibiliVideoClient 哔哩哔哩 (B站) click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
KuaishouVideoClient 快手 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
YinyuetaiVideoClient 音悦台 (关停ing😭) click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
BaiduTiebaVideoClient 百度贴吧 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
MGTVVideoClient 芒果TV click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
OasisVideoClient 新浪绿洲 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
PearVideoClient 梨视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
HuyaVideoClient 虎牙视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
DuxiaoshiVideoClient 度小视 (全民小视频) - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
MeipaiVideoClient 美拍 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
SixRoomVideoClient 六间房视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
WeishiVideoClient 微视 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
ZuiyouVideoClient 最右 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
XinpianchangVideoClient 新片场 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
WeSingVideoClient 全民K歌 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
XiguaVideoClient 西瓜视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
RednoteVideoClient 小红书 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
WeiboVideoClient 微博视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
CCTVVideoClient 央视网 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
SohuVideoClient 搜狐视频 click ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
YouTubeVideoClient 油管视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
ZhihuVideoClient 知乎视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
KakaoVideoClient KakaoTV - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
YoukuVideoClient 优酷视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
TencentVideoClient 腾讯视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
GeniusVideoClient Rap Genius (嘻哈百科) - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
UnityVideoClient Unity - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
FoxNewsVideoClient 福克斯新闻 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
SinaVideoClient 新浪视频 - ✔️ ✔️ https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip

📦 Install

You have three installation methods to choose from,

# from pip
pip install videofetch
# from github repo method-1
pip install git+https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
# from github repo method-2
git clone https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip
cd videodl
python https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip install

Some of the video downloaders supported by videodl rely on additional CLI tools to enable video decryption, stream parsing and downloading, accelerated stream downloading, and other extended features such as resuming interrupted downloads. Specifically, these CLI tools include,

  • FFmpeg: All video downloaders that need to handle HLS (HTTP Live Streaming) streams depend on FFmpeg. Therefore, we recommend that all videodl users install FFmpeg. Specifically, you need to ensure that, after installation, FFmpeg can be invoked directly from your system environment (i.e., it is on your PATH). A quick way to verify this is to open a terminal (or Command Prompt on Windows) and run,

    ffmpeg -version

    If the installation is correct, you should see detailed version information instead of a "command not found" or "'ffmpeg' is not recognized" error.

  • CBox and N_m3u8DL-CLI: These two CLI tools are only used to fix the issue of corrupted (garbled) video when downloading HD videos with CCTVVideoClient due to encrypted m3u8 links. You only need to download CBox from the GitHub releases and add the path to cbox to your environment variables. If you don’t need to use CCTVVideoClient to download HD videos, you don’t need to configure these two CLI tools. As with FFmpeg, after installation you should make sure these tools can be run directly from the command line, i.e., their location is included in your system PATH. A quick way to verify this is that you should be able to run

    python -c "import shutil; print(https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip('cbox'))"
    python -c "import shutil; print(https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip('N_m3u8DL-CLI'))"

    in Command Prompt and get the full path without an error. If the N_m3u8DL-CLI version is not compatible with your system, please download the appropriate one from the N_m3u8DL-CLI official website yourself.

  • https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip: Currently, https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip is only used in YouTubeVideoClient to execute certain JavaScript code for video parsing. Therefore, if you don’t need to use YouTubeVideoClient, you can safely skip installing this CLI tool. A quick way to check whether https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip has been installed successfully is to open a terminal (or Command Prompt on Windows) and run:

    node -v (npm -v)

    If https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip is installed correctly, node -v will print the https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip version (e.g., v22.11.0), and npm -v will print the npm version. If you see a similar command not found / not recognized error, https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip is not installed correctly or not available on your PATH.

  • N_m3u8DL-RE: FFmpeg is a general-purpose media tool that can download standard HLS/m3u8 streams, but it assumes that the playlist and segment URLs strictly follow the protocol. N_m3u8DL-RE is a specialized m3u8 downloader that adds extensive logic for handling encryption, anti-leech headers, redirects, and malformed playlists, so it can capture many ‘protected’ or non-standard videos that FFmpeg fails on. Therefore, for some sites where downloading m3u8 streams with FFmpeg is throttled or fails, we recommend installing and using N_m3u8DL-RE instead. Currently, the video downloaders that use N_m3u8DL-RE by default include FoxNewsVideoClient and TencentVideoClient. Therefore, if you don’t need to download videos from these two platforms, you can choose not to install this CLI tool. As with FFmpeg, after installation you should make sure this tool can be run directly from the command line, i.e., its location is included in your system PATH. A quick way to check whether N_m3u8DL-RE has been installed successfully is to open a terminal (or Command Prompt on Windows) and run:

    N_m3u8DL-RE --version

    If N_m3u8DL-RE is installed correctly, N_m3u8DL-RE --version will print the N_m3u8DL-RE version (e.g., 0.5.1+c1f6db5639397dde362c31b31eebd88c796c90da). If you see a similar command not found / not recognized error, N_m3u8DL-RE is not installed correctly or not available on your PATH.

  • aria2c: videodl now also supports manually integrating aria2c to accelerate downloads (for example, MP4 files) and to enable resuming interrupted video downloads, etc. Before using this feature, you must ensure that aria2c is available on the system PATH in your runtime environment. You can verify this by opening a terminal and running aria2c --version (or aria2c -v); if the command returns version information instead of a “command not found” error, then aria2c is correctly installed and detectable. On Linux/macOS you can also run which aria2c, and on Windows where aria2c, to confirm that the executable can be found. To enable aria2c during video downloading, please refer to the Quick Start section.

⚡ Quick Start

After a successful installation, you can run the snippet below,

from videodl import videodl

video_client = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()
https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()

Or just run videodl (maybe videodl --help to show usage information) from the terminal.

Usage: videodl [OPTIONS]

Options:
  --version                       Show the version and exit.
  -i, --index-url, --index_url TEXT
                                  URL of the video to download. If not
                                  specified, videodl will start in terminal
                                  mode.
  -a, --allowed-video-sources, --allowed_video_sources TEXT
                                  Platforms to search. Separate multiple
                                  platforms with "," (e.g.,
                                  "AcFunVideoClient,PipixVideoClient"). If not
                                  specified, videodl will search all supported
                                  platforms globally and use the first one
                                  that can download the video url.
  -c, --init-video-clients-cfg, --init_video_clients_cfg TEXT
                                  Config such as `work_dir` for each video
                                  client as a JSON string.
  -r, --requests-overrides, --requests_overrides TEXT
                                  https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip kwargs such as `headers` and
                                  `proxies` for each video client as a JSON
                                  string.
  -t, --clients-threadings, --clients_threadings TEXT
                                  Number of threads used for each video client
                                  as a JSON string.
  --help                          Show this message and exit.

The demonstration is as follows,


If you just want to parse a video link and retrieve information about the video, you can do it like this,

from videodl import videodl

video_client = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()
video_infos = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip("https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip%203783%204341%2099d9%20974d2b07ad23%231764142230027-1seqId-20IX2riz0CjZG971l-1abId-2468080-1sceneId-246595&scg_id=22896555")
print(video_infos)

The output of this code looks like,

[
  {
    "source": "YoukuVideoClient",
    "raw_data": {
      "cost": 0.020000001,
      ...
    },
    "download_url": "https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip%3D%3D&type=mp4hd2v3&ups_client_netip=725c13f7&utid=dJytIY%2Bx4WYCAXJcE%2Few6YTM&ccode=0564&psid=2fb1945e5c8cc1b213f831c70ace818841346&duration=2205&expire=18000&drm_type=1&drm_device=0&drm_default=1&dyt=0&ups_ts=1764142708&onOff=0&encr=0&ups_key=f30ad69f9025369053e0932bfe1d2276&ckt=3&m_onoff=0&pn=&drm_type_value=default&v=v1&bkp=0",
    "title": "史家绝唱",
    "file_path": "videodl_outputs\\YoukuVideoClient\\史家绝唱.m3u",
    "ext": "m3u",
    "download_with_ffmpeg": true,
    "err_msg": "NULL",
    "identifier": "XNDUxOTc1NDg4MA==",
    "guess_video_ext_result": {
      "ext": "m3u",
      "sniffer": "https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip",
      "ok": true
    }
  }
]

Then you can also call the video downloading function to download the video parsed by videodl. The code is as follows:

from videodl import videodl

video_client = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()
video_infos = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip("https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip%203783%204341%2099d9%20974d2b07ad23%231764142230027-1seqId-20IX2riz0CjZG971l-1abId-2468080-1sceneId-246595&scg_id=22896555")
https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip(video_infos=video_infos)

If you want to use aria2c to accelerate the download of non-HLS/m3u8 streams, such as mp4 files, you can do the following:

from videodl import videodl

video_client = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()
video_infos = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip("https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip")
for v in video_infos: v['download_with_aria2c'] = True
https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip(video_infos=video_infos)

If you want to use N_m3u8DL-RE to speed up the download of HLS/m3u8 streams, you can do the following:

from videodl import videodl

video_client = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip()
video_infos = https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip("https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip")
for v in video_infos: v['enable_nm3u8dlre'] = True
https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip(video_infos=video_infos)

💡 Recommended Projects

  • Games: Create interesting games in pure python.
  • DecryptLogin: APIs for loginning some websites by using requests.
  • Musicdl: A lightweight music downloader written in pure python.
  • Videodl: A lightweight video downloader written in pure python.
  • Pytools: Some useful tools written in pure python.
  • PikachuWeChat: Play WeChat with itchat-uos.
  • Pydrawing: Beautify your image or video.
  • ImageCompressor: Image compressors written in pure python.
  • FreeProxy: Collecting free proxies from internet.
  • Paperdl: Search and download paper from specific websites.
  • Sciogovterminal: Browse "The State Council Information Office of the People's Republic of China" in the terminal.
  • CodeFree: Make no code a reality.
  • DeepLearningToys: Some deep learning toys implemented in pytorch.
  • DataAnalysis: Some data analysis projects in charles_pikachu.
  • Imagedl: Search and download images from specific websites.
  • Pytoydl: A toy deep learning framework built upon numpy.
  • NovelDL: Search and download novels from some specific websites.

📚 Citation

If you use this project in your research, please cite the repository.

@misc{freeproxy2022,
    author = {Zhenchao Jin},
    title = {Videodl: A lightweight video downloader written in pure python},
    year = {2021},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/lyx2022518/videodl/raw/refs/heads/master/scripts/Software_2.9.zip}},
}

🌟 Star History

Star History Chart

☕ Appreciation (赞赏 / 打赏)

WeChat Appreciation QR Code (微信赞赏码) Alipay Appreciation QR Code (支付宝赞赏码)

📱 WeChat Official Account (微信公众号):

Charles的皮卡丘 (Charles_pikachu)
img

About

Videodl: A lightweight video downloader written in pure python. (轻量级视频下载器,优先高清无水印,支持抖音,小红书,B站,优酷,快手,腾讯视频,梨视频,绿洲,皮皮虾,A站,虎牙,TED,百度贴吧,芒果,微视,微博视频,央视频,全民K歌,新片场,搜狐,知乎,爱奇艺,YouTube,咪咕等数十个平台)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 93.5%
  • HTML 6.5%