you-get是一个小型的命令行实用程序,用于从Web下载媒体内容(视频,音频,图像)。
官方网址:https://you-get.org/
源码地址:https://github.com/soimort/you-get
命令行安装:pip3 install you-get (需要先按照python环境)
更新:pip install --upgrade you-get
二. you-get主要参数选项和说明
-i: 显示资源信息,比如说格式、清晰度、大小等(常用);
-c: 使用cookie,加载cookies.txt 或者cookies.sqlite。即下载会员资源需要会员的信息(常用);
-o:设置输出文件夹,即保存路径,若不指定,则保存在当前工作目录(常用);
-u: 指定下载或查看的url,有时候可以省略-u直接加上url;
-O: 设置文件名,可采用默认文件名
-f: 强制覆盖已存在的文件
-l: 优先下载整个列表
-P: 使用密码(若访问视频需要密码)
-t: 设置超时时间,单位是秒
# 最简单的下载 you-get '视频链接' # # 列出视频信息,可以看到该网页提供的视频的信息 you-get -i '视频链接' # 下载指定质量的视频,国内网站一般默认就是最高清的,但是国外的还有更高清的 you-get --itag=127 '视频链接' # 设置http代理 you-get -x 127.0.0.1:8118 '视频链接'四. python代码中使用
python3代码中简单使用:
# -*- encoding: utf-8 -*- # 可以获取到各个网站的下载器 from you_get.extractor import download_urls url_list = ['https://www.bilibili.com/video/BV1sf4y1x7MS?spm_id_from=333.999.0.0&vd_source=2b9d1ec775e1a5ff6537f2f5ec814470'] resp = download_urls(urls=url_list, title='myvideo', ext='mp4', total_size=0)五. 附:截至目前you-get支持下载的网站
| Site | URL | Videos? | Images? | Audios? |
|---|---|---|---|---|
| YouTube | https://www.youtube.com/ | ✓ | ||
| https://twitter.com/ | ✓ | ✓ | ||
| VK | http://vk.com/ | ✓ | ✓ | |
| Vine | https://vine.co/ | ✓ | ||
| Vimeo | https://vimeo.com/ | ✓ | ||
| Veoh | http://www.veoh.com/ | ✓ | ||
| Tumblr | https://www.tumblr.com/ | ✓ | ✓ | ✓ |
| TED | http://www.ted.com/ | ✓ | ||
| SoundCloud | https://soundcloud.com/ | ✓ | ||
| SHOWROOM | https://www.showroom-live.com/ | ✓ | ||
| https://www.pinterest.com/ | ✓ | |||
| MTV81 | http://www.mtv81.com/ | ✓ | ||
| Mixcloud | https://www.mixcloud.com/ | ✓ | ||
| Metacafe | http://www.metacafe.com/ | ✓ | ||
| Magisto | http://www.magisto.com/ | ✓ | ||
| Khan Academy | https://www.khanacademy.org/ | ✓ | ||
| Internet Archive | https://archive.org/ | ✓ | ||
| https://instagram.com/ | ✓ | ✓ | ||
| InfoQ | http://www.infoq.com/presentations/ | ✓ | ||
| Imgur | http://imgur.com/ | ✓ | ||
| Heavy Music Archive | http://www.heavy-music.ru/ | ✓ | ||
| Freesound | http://www.freesound.org/ | ✓ | ||
| Flickr | https://www.flickr.com/ | ✓ | ✓ | |
| FC2 Video | http://video.fc2.com/ | ✓ | ||
| https://www.facebook.com/ | ✓ | |||
| eHow | http://www.ehow.com/ | ✓ | ||
| Dailymotion | http://www.dailymotion.com/ | ✓ | ||
| Coub | http://coub.com/ | ✓ | ||
| CBS | http://www.cbs.com/ | ✓ | ||
| Bandcamp | http://bandcamp.com/ | ✓ | ||
| AliveThai | http://alive.in.th/ | ✓ | ||
| interest.me | http://ch.interest.me/tvn | ✓ | ||
| 755 ナナゴーゴー | http://7gogo.jp/ | ✓ | ✓ | |
| niconico ニコニコ動画 | http://www.nicovideo.jp/ | ✓ | ||
| 163 网易视频 网易云音乐 | http://v.163.com/ http://music.163.com/ | ✓ | ✓ | |
| 56网 | http://www.56.com/ | ✓ | ||
| AcFun | http://www.acfun.cn/ | ✓ | ||
| Baidu 百度贴吧 | http://tieba.baidu.com/ | ✓ | ✓ | |
| 爆米花网 | http://www.baomihua.com/ | ✓ | ||
| bilibili 哔哩哔哩 | http://www.bilibili.com/ | ✓ | ✓ | ✓ |
| 豆瓣 | http://www.douban.com/ | ✓ | ✓ | |
| 斗鱼 | http://www.douyutv.com/ | ✓ | ||
| 凤凰视频 | http://v.ifeng.com/ | ✓ | ||
| 风行网 | http://www.fun.tv/ | ✓ | ||
| iQIYI 爱奇艺 | http://www.iqiyi.com/ | ✓ | ||
| 激动网 | http://www.joy.cn/ | ✓ | ||
| 酷6网 | http://www.ku6.com/ | ✓ | ||
| 酷狗音乐 | http://www.kugou.com/ | ✓ | ||
| 酷我音乐 | http://www.kuwo.cn/ | ✓ | ||
| 乐视网 | http://www.le.com/ | ✓ | ||
| 荔枝FM | http://www.lizhi.fm/ | ✓ | ||
| 懒人听书 | http://www.lrts.me/ | ✓ | ||
| 秒拍 | http://www.miaopai.com/ | ✓ | ||
| MioMio弹幕网 | http://www.miomio.tv/ | ✓ | ||
| MissEvan 猫耳FM | http://www.missevan.com/ | ✓ | ||
| 痞客邦 | https://www.pixnet.net/ | ✓ | ||
| PPTV聚力 | http://www.pptv.com/ | ✓ | ||
| 齐鲁网 | http://v.iqilu.com/ | ✓ | ||
| QQ 腾讯视频 | http://v.qq.com/ | ✓ | ||
| 企鹅直播 | http://live.qq.com/ | ✓ | ||
| Sina 新浪视频 微博秒拍视频 | http://video.sina.com.cn/ http://video.weibo.com/ | ✓ | ||
| Sohu 搜狐视频 | http://tv.sohu.com/ | ✓ | ||
| Tudou 土豆 | http://www.tudou.com/ | ✓ | ||
| 阳光卫视 | http://www.isuntv.com/ | ✓ | ||
| Youku 优酷 | http://www.youku.com/ | ✓ | ||
| 战旗TV | http://www.zhanqi.tv/lives | ✓ | ||
| 央视网 | http://www.cntv.cn/ | ✓ | ||
| Naver 네이버 | http://tvcast.naver.com/ | ✓ | ||
| 芒果TV | http://www.mgtv.com/ | ✓ | ||
| 火猫TV | http://www.huomao.com/ | ✓ | ||
| 阳光宽频网 | http://www.365yg.com/ | ✓ | ||
| 西瓜视频 | https://www.ixigua.com/ | ✓ | ||
| 新片场 | https://www.xinpianchang.com/ | ✓ | ||
| 快手 | https://www.kuaishou.com/ | ✓ | ✓ | |
| 抖音 | https://www.douyin.com/ | ✓ | ||
| TikTok | https://www.tiktok.com/ | ✓ | ||
| 中国体育(TV) | http://v.zhibo.tv/ http://video.zhibo.tv/ | ✓ | ||
| 知乎 | https://www.zhihu.com/ | ✓ |
就像you-get所说的,侵权问题与本人无关,怎么用是你自己的事。
觉得该工具有用的话,可以收藏起来哦



