@@
@@
@@
@@
# @@ #
+ @@ *
@@@@
@ @
@@**************@@
This project is mainly used to download videos from various websites. It currently supports m3u8 streaming media file downloads and station b video downloads (currently only supports single videos, dramas, multiple videos, etc. are still under development), and supports multi-threaded downloads. , the downloading of other types (or websites) videos is still under development...
python:3.x
Download code using git
git clone https://github.com/duibu/downloader.git
Install required dependencies
pip install -r requirements.txt
-u --url: 下载视频的url地址,只可以设置单个url
--name --video-name: 下载到本地视频的文件名称
--path --save-path: 视频保存路径
--batch-file: 批量地址文件的绝对路径,批量下载时使用,支持csv和txt
--thread: 下载视频文件的线程数
--site-type: 网站类型,例如下载b站视频时该项配置bili
--proxy: 配置代理信息,示例(clash for windows):--proxy http=http://127.0.0.1:7890 https=http://127.0.0.1:7890
Direct download
python downloader.py --url ' http://example.com/example.m3u8?xxx=xxx '
Specify file name to download
python downloader.py --url ' http://example.com/example.m3u8?xxx=xxx ' --name video
Specify the save path and file name to download
python downloader.py --url ' http://example.com/example.m3u8?xxx=xxx ' --name video --path /home/user/video
Configure proxy when downloading
python downloader.py --url ' http://example.com/example.m3u8?xxx=xxx ' --proxy http= ' http://127.0.0.1:7890 ' https= ' https://127.0.0.1:7890 '
Example of batch downloading url files
python downloader.py --batch-file d:/video/url.txt --path /home/user/video
Direct download
python downloader.py --url ' https://www.bilibili.com/video/BV1DX4y1p7CT/ ' --site-type bili
Multi-threaded download
python downloader.py --url ' https://www.bilibili.com/video/BV1DX4y1p7CT/ ' --thread 2 --site-type bili
After using Clash for Windows to surf the Internet scientifically, it prompts a network exception.
When Clash for Windows configures the proxy, only the http protocol can use the proxy normally. The https protocol needs to use http://localhost:7890
to be the proxy. Therefore, it is recommended to turn off the proxy or manually enter the proxy protocol and address. For details, please use --help Command to view parameter description
Prompt for insufficient permissions
Some resources require authorization to access, such as bilibili 1080P videos. Please allow the program to read browser cookies when using it. If you still do not have permission to read cookies, please check the login status of the website account corresponding to the browser corresponding to the selected cookie.
Unable to read cookie
In the Windows operating system, the cookie file may be occupied by the browser. If the program cannot read the cookie, it is recommended to close the browser and re-run the program.
Other questions
If you encounter other problems, please submit Issues, and you are welcome to fix them and merge them. Comments are also welcome
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache-2.0 license.