iawia002 / Lulu

[Unmaintained] A simple and clean video/music/image downloader 👾
MIT License
816 stars 142 forks source link

查看YouTube视频可用格式的时候出错 #100

Closed ppdng closed 6 years ago

ppdng commented 6 years ago

lulu: version 0.5.3,Python 3.6.4

lulu -i 'https://www.youtube.com/watch?v=GjJKdQTD1bc' --debug
lulu: version 0.5.3, a tiny downloader that scrapes the web.
lulu: Namespace(URL=["'https://www.youtube.com/watch?v=GjJKdQTD1bc'"], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=True, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False)
Traceback (most recent call last):
  File "c:\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python36-32\Scripts\lulu.exe\__main__.py", line 9, in <module>
  File "c:\python\python36-32\lib\site-packages\lulu\__main__.py", line 92, in main
    main(**kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1327, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1217, in script_main
    **extra
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 955, in download_main
    download(url, **kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1317, in any_download
    m, url = url_to_module(url)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1307, in url_to_module
    conn.request('HEAD', video_url, headers=FAKE_HEADERS)
  File "c:\python\python36-32\lib\http\client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1026, in _send_output
    self.send(msg)
  File "c:\python\python36-32\lib\http\client.py", line 964, in send
    self.connect()
  File "c:\python\python36-32\lib\http\client.py", line 936, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "c:\python\python36-32\lib\socket.py", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "c:\python\python36-32\lib\socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
iawia002 commented 6 years ago

访问这些网站要代理的

ppdng commented 6 years ago

我路由器上挂着代理的,直接下载YouTube视频是可以的,但查看信息的时候就会报错。

iawia002 commented 6 years ago

但是这个报错看起来确实像是网络无法访问的问题

ppdng commented 6 years ago

嗯,非常奇怪,我在 PowerShell 试了下是没问题的,但在 CMD 下就会有这个问题