无需任何编程经验,一分钟就可以自己用ChatGPT打造一个万能下载器,可以下载国内外主流视频网站,如youtube、twitter、腾讯、爱奇艺、优酷、bilibili、网易云音乐、Ted、知乎、SoundCloud、Facebook等。
首选,在电脑上安装一个you-get的Python库,安装命令:pip install you-get
然后让ChatGPT来写代码:
写一段Python代码,实现下载网页音视频和图片的功能,具体步骤如下:
用户输入一个URL,获取这个URL;
用you-get库下载URL中的音频、视频或图片;
保存音频、视频或图片到电脑D盘video文件夹中;
如果下载成功,输出下载成功信息,然后继续等待用户输入URL;
如果下载失败,输出下载失败信息,然后继续等待用户输入URL;
运行结果出错:
请输入您想下载的URL:https://www.youtube.com/watch?v=g30slJamX4c
下载失败: download_main() missing 2 required positional arguments: 'urls' and 'playlist'
ChatGPT进行了修改,继续运行,又出错了:
请输入您想下载的URL:https://www.youtube.com/watch?v=g30slJamX4c
下载失败: name 'sys' is not defined
请输入您想下载的URL:
ChatGPT第二次修改,这次成功了。
Youtube视频下载成功:
腾讯视频下载成功:
B站下载成功:
下面是you-get所有支持的网站,数量居多:
网站 | 网址 | 视频 | 图片 | 音频 |
---|---|---|---|---|
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/ | ✓ |
本文分享自 Dance with GenAI 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!