yutto-dev / bilili

:beers: bilibili video (including bangumi) and danmaku downloader | B站视频(含番剧)、弹幕下载器
https://bilili.nyakku.moe
GNU General Public License v3.0
1.17k stars 89 forks source link

🐛 下载时报错:[Errno 11001] getaddrinfo failed #90

Closed dydhyhwu closed 3 years ago

dydhyhwu commented 3 years ago

调用方式

bilili  https://www.bilibili.com/bangumi/media/md102392 -y --danmaku ass -q 120 --disable-proxy --use-mirrors  -d "E:\[02]动漫"

环境信息

问题简述

运行命令后,在解析过程中会抛出错误。如下文:

Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connection.py", line 353, in connect
    conn = self._new_conn()
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x00000147AB53DD60>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xy59x53x113x158xy.mcdn.bilivideo.cn', port=4483): Max retries exceeded with url: /upgcxcode/58/08/51640858/51640858_da8-1-30112.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1619077722&gen=playurlv2&os=mcdn&oi=2936792839&trid=2f43f53ce2694338ac895bc7a00af31cp&platform=pc&upsig=b2670e02acd181db60a906766173ee27&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mcdnid=8000024&mid=30632061&orderid=0,3&agrr=1&logo=A0000080 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000147AB53DD60>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

是因为我网络有问题吗?我正常访问都是没问题的。

预期行为

正常下载

额外信息

不是很稳定,有时候抓取第一集信息就报错了, 有时候抓到第6集才报错

SigureMo commented 3 years ago

是网络问题(这里测试完全正常),多运行试几下吧

dydhyhwu commented 3 years ago

是网络问题(这里测试完全正常),多运行试几下吧

T.T 试了几十次, 没有一次下载成功了。好难受,我本地用浏览器打开又没啥问题。

SigureMo commented 3 years ago

如果单话能解析成功的话,试试逐话下载 也即第一次加上参数 -p 1,第二次 -p 2……

dydhyhwu commented 3 years ago

啊 谢谢, 这样一集一集没问题的。T.T 非常感谢, 大佬有群可以交流么

SigureMo commented 3 years ago

啊,没有群,有什么问题直接在 discusstions 里提就好

dydhyhwu commented 3 years ago

嗯嗯, 非常感谢。