https://github.com/zhangn1985/ykdl【 在 wxuyec 的大作中提到: 】
:
: 大家好,我以前可以用you-get下载B站的视频,
: 不过现在出现这样的问题。
: Traceback (most recent call last):
: File "/usr/lib/python3.8/site-packages/you\_get/common.py", line 955, in download\_urls
: total\_size = urls\_size(urls, faker=faker, headers=headers)
: File "/usr/lib/python3.8/site-packages/you\_get/common.py", line 524, in urls\_size
: return sum(\[url_size(url, faker=faker, headers=headers) for url in urls\])
: File "/usr/lib/python3.8/site-packages/you_get/common.py", line 524, in <listcomp>
: return sum(\[url_size(url, faker=faker, headers=headers) for url in urls\])
: File "/usr/lib/python3.8/site-packages/you\_get/common.py", line 515, in url\_size
: response = urlopen\_with\_retry(request.Request(url, headers=headers))
: File "/usr/lib/python3.8/site-packages/you\_get/common.py", line 408, in urlopen\_with_retry
: return request.urlopen(\*args, \*\*kwargs)
: File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
: return opener.open(url, data, timeout)
: File "/usr/lib/python3.8/urllib/request.py", line 525, in open
: response = self._open(req, data)
: File "/usr/lib/python3.8/urllib/request.py", line 547, in _open
: return self.\_call\_chain(self.handle_open, 'unknown',
: File "/usr/lib/python3.8/urllib/request.py", line 502, in \_call\_chain
: result = func(*args)
: File "/usr/lib/python3.8/urllib/request.py", line 1387, in unknown_open
: raise URLError('unknown url type: %s' % type)
:
: urllib.error.URLError: <urlopen error unknown url type: \
https://www.bilibili.com/video/av90402289?p=1 : 这个视频的网址是
:
https://www.bilibili.com/video/BV1KW411S7FB?p=22 : 于是我打开bilibili.py看了一下,想看看能不能修改,不过看不大懂。
:
: 于是我又回头看以前我下的视频的网址,他们没有变,于是我
: 想下载试试,结果现在也遇到同上的问题。
:
: 上次用了@callmebbser提供的程序时也遇到url不对的问题,
: 当时是因为我的python是3.6的,有些语法不同了。我怀疑
: 我新安装的you-get也是这个问题,于是我把原来用pip3.6安装
: 的you-get卸载了,重新用pip3.8安装一次,结果不对。
: --
发自「今日水木 on Android」
--
FROM 110.182.192.*