Mac M2 you-get下载b站视频失败的解决办法和使用-c选项下载清晰视频的方法
you-get: [error] oops, something went wrong.解决
报错
(base) qianying@qianyingdeMacBook-Air ~ % you-get -i 'https://www.bilibili.com/video/BV1Co4y1H7DU?vd_source=939e9623efe94640c6e5a5eff0faae6d' you-get: [error] oops, something went wrong. you-get: don't panic, c'est la vie. please try the following steps: you-get: (1) Rule out any network problem. you-get: (2) Make sure you-get is up-to-date. you-get: (3) Check if the issue is already known, on you-get: https://github.com/soimort/you-get/wiki/Known-Bugs you-get: https://github.com/soimort/you-get/issues you-get: (4) Run the command with '--debug' option, you-get: and report this issue with the full output. (base) qianying@qianyingdeMacBook-Air ~ % pip3 uninstall you-get Found existing installation: you-get 0.4.1650 Uninstalling you-get-0.4.1650: Would remove: /Users/qianying/miniconda3/bin/you-get /Users/qianying/miniconda3/lib/python3.9/site-packages/you_get-0.4.1650.dist-info/* /Users/qianying/miniconda3/lib/python3.9/site-packages/you_get/* Proceed (Y/n)? y Successfully uninstalled you-get-0.4.1650 (base) qianying@qianyingdeMacBook-Air ~ %
重新安装
# 更新 pip uninstall you-get pip3 install --upgrade pip --index-url=https://pypi.tuna.tsinghua.edu.cn/simple pip3 install you-get --index-url=https://pypi.tuna.tsinghua.edu.cn/simple pip3 install --upgrade you-get -i http://mirrors.aliyun.com/pypi/simple/
还是报错
you-get版本
you-get 0.4.1650 pypi_0 pypi
使用 '--debug'选项运行命令
you-get -i 'https://www.bilibili.com/video/BV1Co4y1H7DU?vd_source=939e9623efe94640c6e5a5eff0faae6d' --debug
会出现详细的错误内容,发现是/Users/qianying/miniconda3/lib/python3.9/site-packages/you_get/extractors/bilibili.py出错了
去github
https://github.com/soimort/you-get/blob/develop/src/you_get/extractors/bilibili.py下载这个文件,替换原来的bilibili.py文件
再次尝试,可以下载了,但是显示需要cookies,才能下载更清晰的
you-get: You will need login cookies for 720p formats or above. (use --cookies to load cookies.txt.)
使用-c选项下载更清晰的视频
火狐浏览器cookie保存位置
firefox 的cookie 存放在哪里?_firefox cookies.sqlite-CSDN博客
在地址栏输入about:support, 打开配置页
找到cookie.sqlite所在位置
(base) qianying@qianyingdeMacBook-Air b65asr9u.default-release % pwd /Users/qianying/Library/Application Support/Firefox/Profiles/b65asr9u.default-release (base) qianying@qianyingdeMacBook-Air b65asr9u.default-release % ls cookies.sqlite cookies.sqlite
开源项目you-get的下载和使用、使用Cookie、配置ffmpeg_youget怎么添加cookie-CSDN博客
注意,目前you-get只支持使用火狐浏览器的Cookie格式,可以使用sqlite文件或者TXT文件,一般会使用sqlite
you-get -i 'https://www.bilibili.com/video/BV1Co4y1H7DU?vd_source=939e9623efe94640c6e5a5eff0faae6d' -c '/Users/qianying/Library/Application Support/Firefox/Profiles/b65asr9u.default-release/cookies.sqlite'
现在就可以下载清晰的视频了
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。