Skip to content

Download Youku video error#3033

Open
xuenhua wants to merge 1 commit intosoimort:developfrom
xuenhua:develop
Open

Download Youku video error#3033
xuenhua wants to merge 1 commit intosoimort:developfrom
xuenhua:develop

Conversation

@xuenhua
Copy link
Copy Markdown

@xuenhua xuenhua commented Nov 2, 2024

python3 you-get 'https://v.youku.com/v_show/id_XMzE5MzM3MTY4MA==.html' you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get: (1) Rule out any network problem.
you-get: (2) Make sure you-get is up-to-date.
you-get: (3) Check if the issue is already known, on
you-get: https://github.com/soimort/you-get/wiki/Known-Bugs
you-get: https://github.com/soimort/you-get/issues
you-get: (4) Run the command with '--debug' option,
you-get: and report this issue with the full output.

python3 you-get 'https://v.youku.com/v_show/id_XMzE5MzM3MTY4MA==.html'
you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get:   (1) Rule out any network problem.
you-get:   (2) Make sure you-get is up-to-date.
you-get:   (3) Check if the issue is already known, on
you-get:         https://github.com/soimort/you-get/wiki/Known-Bugs
you-get:         https://github.com/soimort/you-get/issues
you-get:   (4) Run the command with '--debug' option,
you-get:       and report this issue with the full output.
@xuenhua
Copy link
Copy Markdown
Author

xuenhua commented Nov 2, 2024

debug info

python3 you-get https://v.youku.com/v_show/id_XMzE5MzM3MTY4MA --debug
[DEBUG] get_content: https://ups.youku.com/ups/get.json?vid=XMzE5MzM3MTY4MA&ccode=0564&client_ip=192.168.1.1&utid=k5GsHyckbV0CASdEBmj3H4RP&client_ts=1730519958&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu/86PR1u/Wh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1/Y6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo/0y9D2K42SaB8Y/%2BaD2K42SaB8Y/%2BahU%2BWOZsHcrxysooUeND
you-get: version 0.4.1730, a tiny downloader that scrapes the web.
you-get: Namespace(version=False, help=False, info=False, url=False, json=False, no_merge=False, no_caption=False, postfix=False, prefix=None, force=False, skip_existing_file_size_check=False, format=None, output_filename=None, output_dir='.', player=None, cookies=None, timeout=600, debug=True, input_file=None, password=None, playlist=False, first=None, last=None, size=None, auto_rename=False, insecure=False, http_proxy=None, extractor_proxy=None, no_proxy=False, socks_proxy=None, stream=None, itag=None, m3u8=False, URL=['https://v.youku.com/v_show/id_XMzE5MzM3MTY4MA'])
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1455, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/UU/Documents/you-get/you-get", line 11, in <module>
    you_get.main(repo_path=_filepath)
  File "/Users/UU/Documents/you-get/src/you_get/__main__.py", line 92, in main
    main(**kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 1883, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 1772, in script_main
    download_main(
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 1386, in download_main
    download(url, **kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 1874, in any_download
    m.download(url, **kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/extractors/youku.py", line 308, in youku_download_by_url
    Youku().download_by_url(url, **kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/extractor.py", line 48, in download_by_url
    self.prepare(**kwargs)
  File "/Users/UU/Documents/you-get/src/you_get/extractors/youku.py", line 168, in prepare
    self.youku_ups()
  File "/Users/UU/Documents/you-get/src/you_get/extractors/youku.py", line 96, in youku_ups
    api_meta = json.loads(get_content(url, headers=headers))
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 479, in get_content
    response = urlopen_with_retry(req)
  File "/Users/UU/Documents/you-get/src/you_get/common.py", line 439, in urlopen_with_retry
    return request.urlopen(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)>

@TW100x
Copy link
Copy Markdown

TW100x commented Nov 2, 2024

Also i cant download any Youtube video with You-get.

you-get: version 0.4.1730, a tiny downloader that scrapes the web.
you-get: Namespace(version=False, help=False, info=False, url=False, json=False, no_merge=False, no_caption=False, postfix=False, prefix=None, force=False, skip_existing_file_size_check=False, format=None, output_filename=None, output_dir='.', player=None, cookies=None, timeout=600, debug=True, input_file=None, password=None, playlist=False, first=None, last=None, size=None, auto_rename=False, insecure=False, http_proxy=None, extractor_proxy=None, no_proxy=False, socks_proxy=None, stream=None, itag=None, m3u8=False, URL=['https://www.youtube.com/watch?v=O_QYj2KBteY'])
Traceback (most recent call last):
  File "/opt/homebrew/bin/you-get", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/__main__.py", line 92, in main
    main(**kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1883, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1772, in script_main
    download_main(
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1386, in download_main
    download(url, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1874, in any_download
    m.download(url, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractor.py", line 48, in download_by_url
    self.prepare(**kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 252, in prepare
    url = self.__class__.dethrottle(self.js, url)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 91, in dethrottle
    n = n_to_n(js, qs['n'][0])
        ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 85, in n_to_n
    f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1))
                                                          ^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/re/__init__.py", line 262, in escape
    pattern = str(pattern, 'latin1')
              ^^^^^^^^^^^^^^^^^^^^^^
TypeError: decoding to str: need a bytes-like object, NoneType found

@beatrisu21
Copy link
Copy Markdown

Same issue with youtube

@Geil
Copy link
Copy Markdown

Geil commented Nov 16, 2024

The exact same issue with YouTube like @TW100x

@ghen-arcanum
Copy link
Copy Markdown

Same Type Error on Youtube

@xianzhangzx
Copy link
Copy Markdown

Same Type Error on Youtube

Same Type Error on Youtube

@jjyy0927
Copy link
Copy Markdown

Same Type Error on Youtube

same error

@fishsoup1
Copy link
Copy Markdown

This error appears on many websites, is the website's encryption algorithm updated?

@ckgithub2019
Copy link
Copy Markdown

Have you ever get the error like "you-get: Server refused to provide video details. Returned status: LOGIN_REQUIRED."?
you-get 'https://www.youtube.com/watch?v=jNQXAC9IVRw'

@Forest-Lee
Copy link
Copy Markdown

Forest-Lee commented Jul 26, 2025

For network issue, try closing your proxy client, such as clash.
And same TypeError on youtube.

@jeddy2020
Copy link
Copy Markdown

Also i cant download any Youtube video with You-get.

you-get: version 0.4.1730, a tiny downloader that scrapes the web.
you-get: Namespace(version=False, help=False, info=False, url=False, json=False, no_merge=False, no_caption=False, postfix=False, prefix=None, force=False, skip_existing_file_size_check=False, format=None, output_filename=None, output_dir='.', player=None, cookies=None, timeout=600, debug=True, input_file=None, password=None, playlist=False, first=None, last=None, size=None, auto_rename=False, insecure=False, http_proxy=None, extractor_proxy=None, no_proxy=False, socks_proxy=None, stream=None, itag=None, m3u8=False, URL=['https://www.youtube.com/watch?v=O_QYj2KBteY'])
Traceback (most recent call last):
  File "/opt/homebrew/bin/you-get", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/__main__.py", line 92, in main
    main(**kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1883, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1772, in script_main
    download_main(
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1386, in download_main
    download(url, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/common.py", line 1874, in any_download
    m.download(url, **kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractor.py", line 48, in download_by_url
    self.prepare(**kwargs)
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 252, in prepare
    url = self.__class__.dethrottle(self.js, url)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 91, in dethrottle
    n = n_to_n(js, qs['n'][0])
        ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/you-get/0.4.1730/libexec/lib/python3.12/site-packages/you_get/extractors/youtube.py", line 85, in n_to_n
    f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1))
                                                          ^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/re/__init__.py", line 262, in escape
    pattern = str(pattern, 'latin1')
              ^^^^^^^^^^^^^^^^^^^^^^
TypeError: decoding to str: need a bytes-like object, NoneType found

I have the same issue with you.
No idea how to figure it out.
Try with different versions of Python, for example 3.13.9, 3.14.0, no resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.