大家好,我以前可以用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: ['http>
我是在windows中cygwin下用
pip3.8 install you-get
安装的you-get。
开始我也觉得可能是因为这个视频的网址和
我以前下载的视频的网址有点不一样的原因。以前的网址是这样
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安装一次,结果不对。
--
修改:wxuyec FROM 222.94.166.*
FROM 222.94.166.*