Closed Nightmare0829 closed 6 years ago
$ lulu --format=mp4 https://www.bilibili.com/video/av13260183/ -l -o ./videos/bilibili/stanford_deep_learning --debug [DEBUG] url_locations: https://www.bilibili.com/video/av13260183/ [DEBUG] get_content: https://www.bilibili.com/widget/getPageList?aid=13260183 [DEBUG] url_locations: https://www.bilibili.com/video/av13260183/index_1.html [DEBUG] get_content: https://www.bilibili.com/video/av13260183/index_1.html [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=116&quality=116&ts=1520581733&sign=f09fd433c9ae5605725e3ce364d2119f [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=74&quality=74&ts=1520581734&sign=173a9488e85eb5fce81a9af1a463a339 [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=80&quality=80&ts=1520581734&sign=ae41d6d0cada19398780ac1117f03413 [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=64&quality=64&ts=1520581735&sign=4b1a378fa278f8c6b6a81abb634b8523 [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=32&quality=32&ts=1520581735&sign=6a0c1c104c8d703438834318f6c0e174 [DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=15&quality=15&ts=1520581735&sign=a165c158b3f9b196e0aa2c4faf7d7e42 [DEBUG] get_content: https://comment.bilibili.com/21741263.xml site: 哔哩哔哩 bilibili.com title: 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、Introduction to Convolutional Neural Networks for Visual Recognition stream: - format: mp4 container: mp4 size: 199.4 MiB (209126207 bytes) # download-with: lulu --format=mp4 [URL] Downloading 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、In.mp4 ... 13.8% ( 27.5/199.4MB) ├██████──────────────────────────────────┤[1/1] 79 kB/s[DEBUG] request attempt 1 timeout 100% (199.4/199.4MB) ├████████████████████████████████████████┤[1/1] 124 kB/s[DEBUG] url_locations: https://www.bilibili.com/video/av13260183/index_2.html lulu: version 0.4.9, a tiny downloader that scrapes the web. lulu: Namespace(URL=['https://www.bilibili.com/video/av13260183/'], cookies=None, debug=True, extractor_proxy=None, force=False, format='mp4', help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='/Users/lixiang/Desktop/videos/bilibili/stanford_deep_learning', output_filename=None, password=None, player=None, playlist=True, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False) Downloading 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、In.cmt.xml ... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__ self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() socket.timeout: _ssl.c:761: The handshake operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/bin/lulu", line 11, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main main(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1419, in main script_main(any_download, any_download_playlist, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1309, in script_main **extra File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1045, in download_main download_playlist(url, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1415, in any_download_playlist m.download_playlist(url, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 353, in bilibili_download_playlist_by_url page_url, subtitle=subtitle, **kwargs File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractor.py", line 78, in download_by_url self._prepare_download(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractor.py", line 52, in _prepare_download self.prepare(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 150, in prepare self.url = url_locations([self.url])[0] File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 434, in url_locations response = urlopen_with_retry(request.Request(url)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 226, in urlopen_with_retry return request.urlopen(*args, context=context, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: <urlopen error _ssl.c:761: The handshake operation timed out>
使用lulu下载B站含有分集列表选项视频的时候会失败。只能下载第一集,下载第二集就会出现报错。
又是这个 ssl,现在不清楚产生这个错误的原因,可能是网络的原因,一般你重试几次就好了
你可以先用 https://github.com/iawia002/annie 试试,播放列表也支持,go 语言写的,比 lulu 快
使用lulu下载B站含有分集列表选项视频的时候会失败。只能下载第一集,下载第二集就会出现报错。