V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
zdd42sh
V2EX  ›  Python

you-get 命令不能下载 B 站视频了吗?

  •  
  •   zdd42sh · 2018-01-04 22:24:54 +08:00 · 18287 次点击
    这是一个创建于 2274 天前的主题,其中的信息可能已经有所发展或是发生改变。
    you-get https://www.bilibili.com/video/av17732514/ ~
    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.
    这是什么情况
    17 条回复    2018-01-16 14:42:46 +08:00
    402645707
        1
    402645707  
       2018-01-04 22:53:17 +08:00 via Android
    Run the command with '--debug' option 贴下 debug 信息吧
    话说为什么不试试 bilibili 助手的 chrome 扩展呢
    chnyang
        2
    chnyang  
       2018-01-05 09:13:44 +08:00   ❤️ 1
    我之前也是过一段时间不能,后来我用火狐登录了一次 B 站就可以了, 但是具体原因是不是这个 我也说不清
    minato
        3
    minato  
       2018-01-05 09:27:02 +08:00   ❤️ 1
    直接在链接后面加 jj 就可以下载
    uuair
        4
    uuair  
       2018-01-05 12:10:18 +08:00
    我不懂原理是什么,但总觉得没有 youtube-dl 好用。。。很多 porn 的电影 you-get 都下载不了
    funagi
        5
    funagi  
       2018-01-06 20:03:24 +08:00
    @minato #3 惊了,实测可以,这个参数是怎么得来的?
    gdky005
        6
    gdky005  
       2018-01-07 19:39:51 +08:00
    @funagi 给个例子吧,我直接加 jj 好像不行哎。

    原始地址是:you-get 'https://www.bilibili.com/video/av17961420

    you-get 'https://www.bilibili.com/video/av17961420/jj

    应该是什么呢?
    funagi
        7
    funagi  
       2018-01-07 19:42:54 +08:00
    @gdky005 #6

    ```
    $ you-get.exe "https://www.bilibili.com/bangumi/play/ep115237" jj


    $ you-get.exe --version
    you-get: version 0.4.1011, a tiny downloader that scrapes the web.
    ```
    funagi
        8
    funagi  
       2018-01-07 19:44:30 +08:00
    @gdky005 #6

    试了一下,ep 可以,av 还是不行,GG
    gdky005
        9
    gdky005  
       2018-01-07 20:21:28 +08:00
    @funagi
    you-get "https://www.bilibili.com/bangumi/play/ep115237" jj

    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.
    ------------------------------------------------------------


    好奇怪 ,我用自己的 mac, 阿里的服务器,google 的服务器都不行。 就你刚 发的那个地址,只出现了一个信息,然后就断开了。
    gdky005
        10
    gdky005  
       2018-01-07 20:23:05 +08:00
    知道问题了,多谢,看过段时间可以不。
    lalalalalala
        11
    lalalalalala  
       2018-01-08 15:42:13 +08:00
    亲测,这个可以完美解决问题。
    https://github.com/soimort/you-get/pull/2555/commits
    note286
        12
    note286  
       2018-01-12 08:43:06 +08:00
    我现在也下载不了 av 的 b 站视频了,有人知道怎么回事吗?可以修复吗?为什么 you-get 把 issue 功能关闭了,都没有渠道反馈问题了。
    note286
        13
    note286  
       2018-01-12 09:27:49 +08:00
    @lalalalalala 非常感谢,现在都要手动打补丁了,哈哈哈
    lalalalalala
        14
    lalalalalala  
       2018-01-12 13:54:40 +08:00
    @note286 对呀,我们又不能总等着人家更新。
    note286
        15
    note286  
       2018-01-12 18:05:31 +08:00
    @lalalalalala 只要能用就好,也不是很麻烦
    Humilion
        16
    Humilion  
       2018-01-13 23:41:15 +08:00
    @lalalalalala 请问这个要怎么使用?
    speedbird
        17
    speedbird  
       2018-01-16 14:42:46 +08:00
    @Humilion 其实就是在 bilibili.py 这个文件中的 70 行,get_content(api_url) 改成 get_content(api_url, headers={'referer': self.url, 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36'})
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3263 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:50 · PVG 19:50 · LAX 04:50 · JFK 07:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.