Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Youku video error #3033

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

xuenhua
Copy link

@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
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

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/[email protected]/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

Same issue with youtube

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.

3 participants