📄 Documents: videofetch.readthedocs.io
🌌 VideoDL Live Status Dashboard (VideoDL有效性实时监测)
Auto-updated every day via GitHub Actions, with ~3 randomly sampled preview clips.
学习收获更多有趣的内容, 欢迎关注微信公众号:Charles的皮卡丘
- 2026-04-03: Released videofetch v0.8.1 - improved the downloadable video quality in the YouTube video client; added a native API for LeTV video parsing and downloading; added a general-purpose parsing API.
- 2026-04-02: Released videofetch v0.8.0 - refactored the base video client class to make the video downloading logic clearer and more extensible; refactored the video info class to provide more comprehensive functionality and more IDE-friendly hints; fixed bugs and invalidation issues in multiple supported video clients.
- 2026-03-27: Released videofetch v0.7.2 - added a new general-purpose video parsing interface; added support for video parsing and downloading from the player.pl site; fixed some potential bugs.
A fast, lightweight, and fully Python-based video downloader built for simplicity, efficiency, and flexibility. 🚀 Whether used in academic research to collect and organize video data for dataset construction, in development workflows for multimedia processing pipelines, or in personal projects to save online videos for offline access where permitted, this project provides a clean and practical solution without unnecessary bloat. With an easy-to-understand Python codebase and lightweight design, it is suitable both for direct use and for further extension in custom applications. If this project helps with work, research, or everyday use, please consider giving it a star ⭐ — your support helps more people discover the project and motivates future improvements. 🙌
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.
The video platforms currently supported for parsing are,
| Category | VideoClient (EN) | VideoClient (CN) | ParseURL | Download | Core Code |
|---|---|---|---|---|---|
| Chinese Platforms | AcFunVideoClient | A站 | ✔️ | ✔️ | acfun.py |
| BaiduTiebaVideoClient | 百度贴吧 | ✔️ | ✔️ | baidutieba.py | |
| BilibiliVideoClient | 哔哩哔哩 (B站) | ✔️ | ✔️ | bilibili.py | |
| C56VideoClient | 56视频网 | ✔️ | ✔️ | c56.py | |
| CCTVVideoClient | 央视网 | ✔️ | ✔️ | cctv.py | |
| CCtalkVideoClient | CCtalk | ✔️ | ✔️ | cctalk.py | |
| DuxiaoshiVideoClient | 度小视 (全民小视频) | ✔️ | ✔️ | duxiaoshi.py | |
| DouyinVideoClient | 抖音视频 | ✔️ | ✔️ | douyin.py | |
| DongchediVideoClient | 懂车帝 | ✔️ | ✔️ | dongchedi.py | |
| EyepetizerVideoClient | 开眼视频 | ✔️ | ✔️ | eyepetizer.py | |
| HaokanVideoClient | 好看视频 | ✔️ | ✔️ | haokan.py | |
| HuyaVideoClient | 虎牙视频 | ✔️ | ✔️ | huya.py | |
| IQiyiVideoClient | 爱奇艺 | ✔️ | ✔️ | iqiyi.py | |
| Ku6VideoClient | 酷6网 | ✔️ | ✔️ | ku6.py | |
| KuaishouVideoClient | 快手 | ✔️ | ✔️ | kuaishou.py | |
| KugouMVVideoClient | 酷狗音乐MV | ✔️ | ✔️ | kugoumv.py | |
| LeshiVideoClient | 乐视视频 | ✔️ | ✔️ | leshi.py | |
| MeipaiVideoClient | 美拍 | ✔️ | ✔️ | meipai.py | |
| MGTVVideoClient | 芒果TV | ✔️ | ✔️ | mgtv.py | |
| M1905VideoClient | 1905电影网 | ✔️ | ✔️ | m1905.py | |
| OasisVideoClient | 新浪绿洲 | ✔️ | ✔️ | oasis.py | |
| Open163VideoClient | 网易公开课 | ✔️ | ✔️ | open163.py | |
| PearVideoClient | 梨视频 | ✔️ | ✔️ | pear.py | |
| PipigaoxiaoVideoClient | 皮皮搞笑 | ✔️ | ✔️ | pipigaoxiao.py | |
| PipixVideoClient | 皮皮虾 | ✔️ | ✔️ | pipix.py | |
| RednoteVideoClient | 小红书 | ✔️ | ✔️ | rednote.py | |
| SinaVideoClient | 新浪视频 | ✔️ | ✔️ | sina.py | |
| SixRoomVideoClient | 六间房视频 | ✔️ | ✔️ | sixroom.py | |
| SohuVideoClient | 搜狐视频 | ✔️ | ✔️ | sohu.py | |
| TencentVideoClient | 腾讯视频 | ✔️ | ✔️ | tencent.py | |
| WeiboVideoClient | 微博视频 | ✔️ | ✔️ | weibo.py | |
| WeishiVideoClient | 微视 | ✔️ | ✔️ | weishi.py | |
| WeSingVideoClient | 全民K歌 | ✔️ | ✔️ | wesing.py | |
| XiguaVideoClient | 西瓜视频 | ✔️ | ✔️ | xigua.py | |
| XinpianchangVideoClient | 新片场 | ✔️ | ✔️ | xinpianchang.py | |
| XuexiCNVideoClient | 学习强国 | ✔️ | ✔️ | xuexicn.py | |
| YoukuVideoClient | 优酷视频 | ✔️ | ✔️ | youku.py | |
| YinyuetaiVideoClient | 音悦台 (关停ing😭) | ✔️ | ✔️ | yinyuetai.py | |
| ZhihuVideoClient | 知乎视频 | ✔️ | ✔️ | zhihu.py | |
| ZuiyouVideoClient | 最右 | ✔️ | ✔️ | zuiyou.py | |
| Overseas Platforms | ArteTVVideoClient | 德法公共电视网 | ✔️ | ✔️ | artetv.py |
| ABCVideoClient | 澳大利亚广播公司 | ✔️ | ✔️ | abc.py | |
| BeaconVideoClient | BeaconTV | ✔️ | ✔️ | beacon.py | |
| CCCVideoClient | CCC视频 (黑客大会视频) | ✔️ | ✔️ | ccc.py | |
| FoxNewsVideoClient | 福克斯新闻 | ✔️ | ✔️ | foxnews.py | |
| GeniusVideoClient | Rap Genius (嘻哈百科) | ✔️ | ✔️ | genius.py | |
| KakaoVideoClient | KakaoTV | ✔️ | ✔️ | kakao.py | |
| PlusFIFAVideoClient | FIFA+平台 (国际足联+) | ✔️ | ✔️ | plusfifa.py | |
| PlayerPLVideoClient | Player.pl (波兰流行视频点播站) | ✔️ | ✔️ | playerpl.py | |
| RedditVideoClient | 红迪网 | ✔️ | ✔️ | reddit.py | |
| TBNUKVideoClient | 英国三一电视台点播网站 | ✔️ | ✔️ | tbnuk.py | |
| TedVideoClient | TED视频 | ✔️ | ✔️ | ted.py | |
| UnityVideoClient | Unity | ✔️ | ✔️ | unity.py | |
| WWEVideoClient | 世界摔角娱乐 | ✔️ | ✔️ | wwe.py | |
| WittyTVVideoClient | Witty TV (意大利多媒体娱乐平台) | ✔️ | ✔️ | wittytv.py | |
| YouTubeVideoClient | 油管视频 | ✔️ | ✔️ | youtube.py |
To make videodl more robust and able to adaptively parse videos from more websites, even when the video URL is not in the supported list above, I also plan to gradually add some general-purpose parsing interfaces. The currently supported generic parsers include,
The default parsing order is to first use the parsers in the supported list. If those fail, the generic parsers are then invoked one by one until parsing succeeds.
You have three installation methods to choose from,
# from pip
pip install videofetch
# from github repo method-1
pip install git+https://github.com/CharlesPikachu/videodl.git@master
# from github repo method-2
git clone https://github.com/CharlesPikachu/videodl.git
cd videodl
python setup.py installSome 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.
-
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. In many cases it’s also faster, because N_m3u8DL-RE can download HLS segments in parallel with optimized retries/merging, while FFmpeg typically pulls segments sequentially by default. ❗ Therefore, we recommend that all videodl users install N_m3u8DL-RE to ensure videodl delivers the best possible performance. ❗ You can skip installing it, but videodl may then be unable to parse some platforms, including but not limited to,
CCTVVideoClient, FoxNewsVideoClient, TencentVideoClient, GVVIPVideoClient, SnapAnyVideoClient, VgetVideoClient, ArteTVVideoClient, XMFlvVideoClient, RedditVideoClient, IIILabVideoClient, WWEVideoClient, IQiyiVideoClient, PlusFIFAVideoClient, IM1907VideoClient, M1905VideoClient, SENJiexiVideoClient, etc.and downloads from many other sites that provide m3u8/HLS streams may also be significantly limited. 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 --versionwill print the N_m3u8DL-RE version (e.g.,0.5.1+c1f6db5639397dde362c31b31eebd88c796c90da). If you see a similarcommand not found/not recognizederror, N_m3u8DL-RE is not installed correctly or not available on yourPATH. -
Bento4: Bento4 is an open-source MP4/DASH/HLS/CMAF toolkit, and in the N_m3u8DL-RE ecosystem it is mainly related as the source of auxiliary utilities such as "mp4decrypt" for handling certain packaged media workflows. Therefore, when using N_m3u8DL-RE to handle some packaged media workflows that involve encryption (e.g.,
TBNUKVideoClient,PlayerPLVideoClientandPlusFIFAVideoClient), you need to make sure the Bento4 tools are available in your runtime environment. A quick way to verify Bento4 is that you should be able to runmp4decrypt --version
If it returns the version information successfully, Bento4 is installed correctly, otherwise the installation has failed or the tool is not in your
PATH. -
Node.js: Currently, Node.js is only used in
YouTubeVideoClient,CCTVVideoClientandTencentVideoClientto execute certain JavaScript code for video parsing. Therefore, if you don’t need to useYouTubeVideoClient,CCTVVideoClientandTencentVideoClient, you can safely skip installing this CLI tool. A quick way to check whether Node.js has been installed successfully is to open a terminal and run,node -v (npm -v)
If Node.js is installed correctly,
node -vwill print the Node.js version (e.g.,v22.11.0), andnpm -vwill print the npm version. If you see a similarcommand not found/not recognizederror, Node.js is not installed correctly or not available on yourPATH. -
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
PATHin your runtime environment. You can verify this by opening a terminal and runningaria2c --version(oraria2c -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 runwhich aria2c, and on Windowswhere aria2c, to confirm that the executable can be found. To enable aria2c during video downloading, please refer to the Quick Start section.
This guide shows the fastest ways to use videodl from the command line and from Python.
videodl supports two common workflows:
- Parse and download in one step
- Parse first, inspect the result, then download
(1) Download a video from a URL
videodl -i "https://www.acfun.cn/v/ac36491489"If videodl can find a matching client, it will parse the URL and start downloading automatically.
The demonstration is as follows,
(2) Start interactive mode
If -i is not provided, videodl starts in terminal mode:
videodlThen enter a video URL when prompted. In interactive mode:
- enter
qto quit - enter
rto restart the UI
(3) Restrict parsing to specific clients
If the URL belongs to a known platform, specifying the client is usually faster.
videodl -i "https://www.acfun.cn/v/ac36491489" -a "AcFunVideoClient"You can also provide multiple clients:
videodl -i "URL" -a "AcFunVideoClient,BilibiliVideoClient"(4) Use only common / generic parsers
videodl -i "URL" -gThis is equivalent to apply_common_video_clients_only=True in Python.
(5) Set client config from the command line
Some options are passed as JSON strings.
Example: change the output directory for one client:
videodl -i "https://www.acfun.cn/v/ac36491489" \
-a "AcFunVideoClient" \
-c '{"AcFunVideoClient": {"work_dir": "downloads"}}'Example: pass custom headers or proxies:
videodl -i "URL" \
-r '{"AcFunVideoClient": {"headers": {"User-Agent": "Mozilla/5.0"}, "proxies": {"http": "http://127.0.0.1:7890", "https": "http://127.0.0.1:7890"}}}'(6) CLI options
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
Requests.get 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.
-g, --apply-common-video-clients-only, --apply_common_video_clients_only
Only apply common video clients.
--help Show this message and exit.Recommended parsing and downloading commands for some widely used video platforms are as follows,
# IQIYI / YOUKU / TENCENT / PPTV / MGTV / CCTV / BILIBILI (爱奇艺, 优酷, 腾讯视频, PPTV, 芒果TV, CCTV, B站等平台的电影电视剧)
videodl -i "IQIYI/YOUKU/TENCENT/PPTV/MGTV/CCTV/BILIBILI VIDEO URL" -g -a IM1907VideoClient (Recommended, 1080p)
videodl -i "IQIYI/YOUKU/TENCENT/PPTV/MGTV/CCTV/BILIBILI VIDEO URL" -g -a SENJiexiVideoClient (Recommended)
videodl -i "IQIYI/YOUKU/TENCENT/PPTV/MGTV/CCTV/BILIBILI VIDEO URL" -g -a JXM3U8VideoClient
videodl -i "IQIYI/YOUKU/TENCENT/PPTV/MGTV/CCTV/BILIBILI VIDEO URL" -g -a XMFlvVideoClient
videodl -i "IQIYI/YOUKU/TENCENT/PPTV/MGTV/CCTV/BILIBILI VIDEO URL" -g -a GVVIPVideoClient
videodl -i "YOUKU/TENCENT" -g -a LvlongVideoClient
# Examples
videodl -i "https://www.iqiyi.com/v_cy4phe8b08.html" -g -a IM1907VideoClient
videodl -i "https://v.qq.com/x/cover/mzc002001nl46xm/t410130yz0y.html" -g -a IM1907VideoClient
# Please Note
Since the parsing relies on a third-party online parsing API, the downloaded video may contain inserted advertisements.
These ads are not added by videodl, they are inserted by the online parsing website.
We recommend using ffmpeg to trim out the ad segments. (example code see ./scripts/ffmpeg_segment_remover.py)
# MIGU (咪咕视频)
videodl -i "MIGU VIDEO URL" -g -a RayVideoClient
videodl -i "MIGU VIDEO URL" -g -a KedouVideoClient
# Examples
videodl -i "https://www.miguvideo.com/p/detail/759959727" -g -a KedouVideoClient
# DOUYIN / TIKTOK / KUAISHOU / XIAOHONGSHU / YOUTUBE / FACEBOOK / TITTER (X) (抖音, 抖音海外, 快手, 小红书, 油管, 脸书, 推特视频等)
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a VideoFKVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a SnapAnyVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a GVVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a AnyFetcherVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a IIILabVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a VgetVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a SnapWCVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a KedouVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a KuKuToolVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a XiaolvfangVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a XZDXVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a KIT9VideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a QZXDPToolsVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a NoLogoVideoClient
videodl -i "DOUYIN/TIKTOK/KUAISHOU/XIAOHONGSHU/YOUTUBE/FACEBOOK/TITTER VIDEO URL" -g -a SpapiVideoClient
# Examples
videodl -i "https://www.douyin.com/jingxuan?modal_id=7569541184671974899" -g -a SnapAnyVideoClient
videodl -i "https://www.tiktok.com/@pet_statione/video/7579841364599328013?lang=en" -g -a SnapAnyVideoClient
# 1905 (1905电影网)
videodl -i "M1905 VIDEO URL" -a M1905VideoClient
# Examples
videodl -i "https://www.1905.com/video/play/1751538.shtml" -a M1905VideoClient
# XINPIANCHANG (新片场)
videodl -i "XINPIANCHANG VIDEO URL" -a XinpianchangVideoClient
# Examples
videodl -i "https://www.xinpianchang.com/a13536060?from=IndexPick&part=%E7%BC%96%E8%BE%91%E7%B2%BE%E9%80%89&index=1" -a XinpianchangVideoClient
# BILIBILI (B站)
videodl -i "BILIBILI VIDEO URL" -a BilibiliVideoClient
videodl -i "BILIBILI VIDEO URL" -g -a VideoFKVideoClient
# Examples
videodl -i "https://www.bilibili.com/video/BV13x41117TL" -a BilibiliVideoClient
videodl -i "https://www.bilibili.com/video/BV1bK411W797?p=1" -a BilibiliVideoClient
videodl -i "https://www.bilibili.com/bangumi/play/ep21495" -a BilibiliVideoClient
videodl -i "https://www.bilibili.com/video/av8903802/" -a BilibiliVideoClient
# CCTV (央视网)
videodl -i "CCTV VIDEO URL" -a CCTVVideoClient
# Examples
videodl -i "https://v.cctv.com/2026/01/09/VIDE0ifonRhsuR952gJ3zUKu260109.shtml?spm=C90324.PE6LRxWJhH5P.S23920.3" -a CCTVVideoClient
# PLUSFIFA (国际足联+比赛视频)
videodl -i "PLUSFIFA VIDEO URL" -a PlusFIFAVideoClient
# Examples
videodl -i "https://www.plus.fifa.com/en/content/fc-sochaux-montbeliard-vs-lb-chateauroux/6ff75563-c6fc-4b08-b324-54771dbd7029" -a PlusFIFAVideoClientIn practice, the general-purpose video parsers listed under Supported Video Client can handle parsing and downloading videos from most major platforms. The main difference typically comes down to the maximum resolution and overall output quality. If video quality matters to you, feel free to try a few different parsers and compare the results. And if you discover anything useful, you’re welcome to share your findings in the repo’s Discussions section.
(1) Create a VideoClient
from videodl import videodl
video_client = videodl.VideoClient()This creates a high-level client that can:
- choose a suitable parser
- parse a URL into one or more
VideoInfoobjects - download the parsed videos
(2) Parse and download in one step
from videodl import videodl
video_client = videodl.VideoClient()
video_infos = video_client.parsefromurl("https://www.acfun.cn/v/ac36491489")
video_client.download(video_infos)(3) Start interactive mode from Python
from videodl import videodl
video_client = videodl.VideoClient()
video_client.startparseurlcmdui()(4) Use only selected clients
from videodl import videodl
video_client = videodl.VideoClient(
allowed_video_sources=["AcFunVideoClient"]
)
video_infos = video_client.parsefromurl("https://www.acfun.cn/v/ac36491489")
video_client.download(video_infos)(5) Use only common / generic clients
from videodl import videodl
video_client = videodl.VideoClient(apply_common_video_clients_only=True)
video_infos = video_client.parsefromurl("URL")
video_client.download(video_infos)Sometimes it is useful to inspect the parsed result before downloading.
from videodl import videodl
video_client = videodl.VideoClient(allowed_video_sources=["AcFunVideoClient"])
video_infos = video_client.parsefromurl("https://www.acfun.cn/v/ac36491489")
for info in video_infos:
print(info["source"])
print(info["title"])
print(info["download_url"])
print(info["save_path"])
print(info["ext"])
print(info["err_msg"])A parsed item is a VideoInfo object. It behaves like both a dataclass object and a dictionary.
For example, both styles work:
info = video_infos[0]
print(info.title)
print(info["title"])Common fields include:
source: which client produced this resulttitle: video titledownload_url: resolved media URLsave_path: output file pathext: file extensionerr_msg: parsing error, if anydownload_with_ffmpeg: whether ffmpeg should be useddownload_with_aria2c: whether aria2c should be usedenable_nm3u8dlre: whether N_m3u8DL-RE should be used
Once video_infos is ready, download it like this:
video_client.download(video_infos)You can also modify the parsed result before downloading.
Example: enable aria2c for a direct file download:
for info in video_infos:
info["download_with_aria2c"] = True
video_client.download(video_infos)Example: enable N_m3u8DL-RE for HLS / m3u8 downloads:
for info in video_infos:
info["enable_nm3u8dlre"] = True
video_client.download(video_infos)Example: force ffmpeg download:
for info in video_infos:
info["download_with_ffmpeg"] = True
video_client.download(video_infos)(1) Change the output directory
from videodl import videodl
video_client = videodl.VideoClient(
init_video_clients_cfg={
"AcFunVideoClient": {
"work_dir": "downloads"
}
},
allowed_video_sources=["AcFunVideoClient"]
)(2) Pass cookies for parsing or downloading
from videodl import videodl
cookies = "your cookies here"
video_client = videodl.VideoClient(
init_video_clients_cfg={
"SomeVideoClient": {
"default_parse_cookies": cookies,
"default_download_cookies": cookies,
}
},
allowed_video_sources=["SomeVideoClient"]
)(3) Pass custom request options
requests_overrides is useful when a client needs extra headers, cookies, timeout settings, or proxies.
from videodl import videodl
video_client = videodl.VideoClient(
requests_overrides={
"AcFunVideoClient": {
"headers": {
"User-Agent": "Mozilla/5.0"
},
"proxies": {
"http": "http://127.0.0.1:7890",
"https": "http://127.0.0.1:7890"
}
}
},
allowed_video_sources=["AcFunVideoClient"]
)(4) Set download threads per client
from videodl import videodl
video_client = videodl.VideoClient(
clients_threadings={
"AcFunVideoClient": 8
},
allowed_video_sources=["AcFunVideoClient"]
)If the input URL is already a direct media link, videodl will try to handle it directly without needing a platform-specific / general-purpose video client as a parser.
from videodl import videodl
video_client = videodl.VideoClient()
video_infos = video_client.parsefromurl("https://example.com/video.mp4")
video_client.download(video_infos)(1) Prefer specific clients when possible
This is usually faster:
video_client = videodl.VideoClient(allowed_video_sources=["AcFunVideoClient"])than searching through all supported clients.
(2) Generic parsers are useful when platform-specific parsing does not work
Use:
videodl.VideoClient(apply_common_video_clients_only=True)or on the CLI:
videodl -g -i "URL"(3) Some download accelerators require external tools
Depending on how a video is parsed, videodl may work with:
ffmpegaria2cN_m3u8DL-RE
Make sure they are installed and available in your environment before enabling them.
(4) A parse result may contain multiple videos
Some URLs may return more than one VideoInfo, so always treat the return value of parsefromurl() as a list.
Please refer to the documentation for further details: https://videofetch.readthedocs.io/
| Project | ⭐ Stars | 📦 Version | ⏱ Last Update | 🛠 Repository |
|---|---|---|---|---|
| 🎵 Musicdl 轻量级无损音乐下载器 |
🛠 Repository | |||
| 🎬 Videodl 轻量级高清无水印视频下载器 |
🛠 Repository | |||
| 🖼️ Imagedl 轻量级海量图片搜索下载器 |
🛠 Repository | |||
| 🌐 FreeProxy 全球海量高质量免费代理采集器 |
🛠 Repository | |||
| 🌐 MusicSquare 简易音乐搜索下载和播放网页 |
🛠 Repository | |||
| 🌐 FreeGPTHub 真正免费的GPT统一接口 |
🛠 Repository |
If you use this project in your research, please cite the repository.
@misc{videodl2021,
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/CharlesPikachu/videodl/}},
}
| WeChat Appreciation QR Code (微信赞赏码) | Alipay Appreciation QR Code (支付宝赞赏码) |
|---|---|
![]() |
![]() |




