YouTube failing
$ you-get https://www.youtube.com/watch\?v\=LNEOx_Dkdzo
you-get: Server refused to provide video details. Returned status: LOGIN_REQUIRED. Reason: Sign in to confirm you’re not a bot This helps protect our community.
- Add cookies, still 403.
you-get -o . -d -c www.youtube.com.txt --itag=136 'https://www.youtube.com/watch?v=TnHl7FQZgAc'
Errors :
you-get: version 0.4.1743, 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='www.youtube.com.txt', 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='136', m3u8=False, URL=['https://www.youtube.com/watch?v=TnHl7FQZgAc'])
Traceback (most recent call last):
File "/opt/homebrew/bin/you-get", line 8, in
Iinitial settings — Python version 3.13.3 You-Get version 0.4.1743 Windows 11 Corporate 22H2 / 22621.5189 — launch:
python you-get "https://www.youtube.com/watch?v=BqwEr7WXfe0&t=2s" --debug
Error LOG:
[DEBUG] Extracting from the video page...
[DEBUG] get_content: https://www.youtube.com/watch?v=BqwEr7WXfe0
[DEBUG] Retrieving the player code...
[DEBUG] get_content: https://www.youtube.com/s/player/9599b765/player-plasma-ias-tablet-ru_RU.vflset/base.js
[DEBUG] Loading ytInitialPlayerResponse...
[DEBUG] status: OK
[DEBUG] Found format: itag=18
you-get: version 0.4.1743, 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=BqwEr7WXfe0&t=2s'])
Traceback (most recent call last):
File "C:\you-get\you-get", line 11, in <module>
you_get.main(repo_path=_filepath)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\you-get/src\you_get\__main__.py", line 92, in main
main(**kwargs)
~~~~^^^^^^^^^^
File "C:\you-get/src\you_get\common.py", line 1883, in main
script_main(any_download, any_download_playlist, **kwargs)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\you-get/src\you_get\common.py", line 1772, in script_main
download_main(
~~~~~~~~~~~~~^
download, download_playlist,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
**extra
^^^^^^^
)
^
File "C:\you-get/src\you_get\common.py", line 1386, in download_main
download(url, **kwargs)
~~~~~~~~^^^^^^^^^^^^^^^
File "C:\you-get/src\you_get\common.py", line 1874, in any_download
m.download(url, **kwargs)
~~~~~~~~~~^^^^^^^^^^^^^^^
File "C:\you-get/src\you_get\extractor.py", line 48, in download_by_url
self.prepare(**kwargs)
~~~~~~~~~~~~^^^^^^^^^^
File "C:\you-get/src\you_get\extractors\youtube.py", line 272, in prepare
url = self.__class__.dethrottle(self.js, url)
File "C:\you-get/src\you_get\extractors\youtube.py", line 104, in dethrottle
n = n_to_n(js, qs['n'][0])
File "C:\you-get/src\you_get\extractors\youtube.py", line 99, in n_to_n
n = dukpy.evaljs('%s(%s)("%s")' % (v1def, f1def, n))
File "C:\Users\Master\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\dukpy\evaljs.py", line 138, in evaljs
return JSInterpreter().evaljs(code, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "C:\Users\Master\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\dukpy\evaljs.py", line 57, in evaljs
res = _dukpy.eval_string(self, jscode, jsvars)
_dukpy.JSRuntimeError: ReferenceError: identifier 'Fx' undefined
at [anon] (src\duktape\duktape.c:94432) internal
at [anon] (eval:1)
at eval (eval:1) preventsyield
Previously, a week ago, everything worked well
tring(self, jscode, jsvars) _dukpy.JSRuntimeError: ReferenceError: identifier 'Fx' undefined at [anon] (src\duktape\duktape.c:94432) internal at [anon] (eval:1) at eval (eval:1) preventsyield
metoo,
ReferenceError: identifier 'Fx' undefined at [anon] (src/duktape/duktape.c:94429) internal at EQa (eval:1) at eval (eval:1) preventsyield
I also got the same error when using you-get. I don't know how to solve it?
C:\Users\ll> you-get 'https://www.youtube.com/watch?v=sUrsYsw5mUA' --debug [DEBUG] Extracting from the video page... [DEBUG] get_content: https://www.youtube.com/watch?v=sUrsYsw5mUA [DEBUG] Retrieving the player code... [DEBUG] get_content: https://www.youtube.com/s/player/b2858d36/player-plasma-ias-tablet-en_US.vflset/base.js [DEBUG] Loading ytInitialPlayerResponse... [DEBUG] status: OK [DEBUG] Found format: itag=18 you-get: version 0.4.1743, 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=sUrsYsw5mUA']) Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "D:\Program Files\Python313\Scripts\you-get.exe\__main__.py", line 7, in <module> sys.exit(main()) ~~~~^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\__main__.py", line 92, in main main(**kwargs) ~~~~^^^^^^^^^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\common.py", line 1883, in main script_main(any_download, any_download_playlist, **kwargs) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\common.py", line 1772, in script_main download_main( ~~~~~~~~~~~~~^ download, download_playlist, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... **extra ^^^^^^^ ) ^ File "D:\Program Files\Python313\Lib\site-packages\you_get\common.py", line 1386, in download_main download(url, **kwargs) ~~~~~~~~^^^^^^^^^^^^^^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\common.py", line 1874, in any_download m.download(url, **kwargs) ~~~~~~~~~~^^^^^^^^^^^^^^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\extractor.py", line 48, in download_by_url self.prepare(**kwargs) ~~~~~~~~~~~~^^^^^^^^^^ File "D:\Program Files\Python313\Lib\site-packages\you_get\extractors\youtube.py", line 272, in prepare url = self.__class__.dethrottle(self.js, url) File "D:\Program Files\Python313\Lib\site-packages\you_get\extractors\youtube.py", line 104, in dethrottle n = n_to_n(js, qs['n'][0]) File "D:\Program Files\Python313\Lib\site-packages\you_get\extractors\youtube.py", line 94, in n_to_n f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1)) ~~~~~~~~~^^^^ File "D:\Program Files\Python313\Lib\re\__init__.py", line 312, in escape pattern = str(pattern, 'latin1') TypeError: decoding to str: need a bytes-like object, NoneType found
Anyone encounting issue when trying to download niconico vedios on windows commandline?
I am using you-get 0.4.1743,when I add Netscape format cookie as parameter, I am still asked to provide username and password, which seems to be not working even if you type in the right username and password. The network is fine since I can access this url normally using a proxied Japaese IP. I feel like this issue might be related to niconico's login verifivation policy, as user are required to provide verification code on email. The Netscape format cookie.txt should have no problem since it works for bilibili and the commandline response seems to be not relating to cookie. Following is commandline response:
you-get -c C:\Users\30629\cookie.txt -i https://www.nicovideo.jp/watch/sm44944337
User: [email protected]
Password:
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.
Logging in...
I tried the --debug in commandline,issue seems to be password not recognized and [SSL: NO_CIPHERS_AVAILABLE]:
you-get: version 0.4.1743, a tiny downloader that scrapes the web.
you-get: Namespace(version=False, help=False, info=True, 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='C:\\Users\\30629\\cookie.txt', 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.nicovideo.jp/watch/sm44944337'])
Traceback (most recent call last):
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 1344, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "D:\downloads\Anaconda\Lib\http\client.py", line 1336, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\downloads\Anaconda\Lib\http\client.py", line 1382, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\downloads\Anaconda\Lib\http\client.py", line 1331, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\downloads\Anaconda\Lib\http\client.py", line 1091, in _send_output
self.send(msg)
File "D:\downloads\Anaconda\Lib\http\client.py", line 1035, in send
self.connect()
File "D:\downloads\Anaconda\Lib\http\client.py", line 1477, in connect
self.sock = self._context.wrap_socket(self.sock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\ssl.py", line 1041, in _create
self.do_handshake()
File "D:\downloads\Anaconda\Lib\ssl.py", line 1319, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:1000)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\downloads\Anaconda\Scripts\you-get.exe\__main__.py", line 7, in <module>
File "D:\downloads\Anaconda\Lib\site-packages\you_get\__main__.py", line 92, in main
main(**kwargs)
File "D:\downloads\Anaconda\Lib\site-packages\you_get\common.py", line 1883, in main
script_main(any_download, any_download_playlist, **kwargs)
File "D:\downloads\Anaconda\Lib\site-packages\you_get\common.py", line 1772, in script_main
download_main(
File "D:\downloads\Anaconda\Lib\site-packages\you_get\common.py", line 1386, in download_main
download(url, **kwargs)
File "D:\downloads\Anaconda\Lib\site-packages\you_get\common.py", line 1874, in any_download
m.download(url, **kwargs)
File "D:\downloads\Anaconda\Lib\site-packages\you_get\extractors\nicovideo.py", line 31, in nicovideo_download
nicovideo_login(user, password)
File "D:\downloads\Anaconda\Lib\site-packages\you_get\extractors\nicovideo.py", line 9, in nicovideo_login
response = request.urlopen(request.Request("https://secure.nicovideo.jp/secure/login?site=niconico", headers=fake_headers, data=data.encode('utf-8')))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 515, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 532, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 1392, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\downloads\Anaconda\Lib\urllib\request.py", line 1347, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:1000)>
Logging in...
Doesn't work for the simple example given in the README.
you-get 'https://www.youtube.com/watch?v=jNQXAC9IVRw' --debug
[DEBUG] Extracting from the video page...
[DEBUG] get_content: https://www.youtube.com/watch?v=jNQXAC9IVRw
[DEBUG] Retrieving the player code...
[DEBUG] get_content: https://www.youtube.com/s/player/b7ed0796/player-plasma-ias-tablet-en_US.vflset/base.js
[DEBUG] Loading ytInitialPlayerResponse...
[DEBUG] status: OK
[DEBUG] Found format: itag=18
you-get: version 0.4.1743, 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=jNQXAC9IVRw'])
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.1743/libexec/lib/python3.13/site-packages/you_get/__main__.py", line 92, in main
main(**kwargs)
~~~~^^^^^^^^^^
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/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.1743/libexec/lib/python3.13/site-packages/you_get/common.py", line 1772, in script_main
download_main(
~~~~~~~~~~~~~^
download, download_playlist,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
**extra
^^^^^^^
)
^
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/common.py", line 1386, in download_main
download(url, **kwargs)
~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/common.py", line 1874, in any_download
m.download(url, **kwargs)
~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/extractor.py", line 48, in download_by_url
self.prepare(**kwargs)
~~~~~~~~~~~~^^^^^^^^^^
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/extractors/youtube.py", line 272, in prepare
url = self.__class__.dethrottle(self.js, url)
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/extractors/youtube.py", line 104, in dethrottle
n = n_to_n(js, qs['n'][0])
File "/opt/homebrew/Cellar/you-get/0.4.1743/libexec/lib/python3.13/site-packages/you_get/extractors/youtube.py", line 94, in n_to_n
f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1))
~~~~~~~~~^^^^
File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/re/__init__.py", line 312, in escape
pattern = str(pattern, 'latin1')
TypeError: decoding to str: need a bytes-like object, NoneType found
Doesn't work for the simple example given in the README.
you-get 'https://www.youtube.com/watch?v=jNQXAC9IVRw' --debug -c cookies.txt
[DEBUG] Extracting from the video page...
[DEBUG] get_content: https://www.youtube.com/watch?v=jNQXAC9IVRw
[DEBUG] Retrieving the player code...
[DEBUG] get_content: https://www.youtube.com/s/player/ef259203/player-plasma-ias-tablet-zh_CN.vflset/base.js
[DEBUG] Loading ytInitialPlayerResponse...
[DEBUG] status: OK
[DEBUG] Found format: itag=18
you-get: version 0.4.1743, 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='cookies.txt', 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=jNQXAC9IVRw'])
Traceback (most recent call last):
File "/opt/homebrew/bin/you-get", line 8, in
Same TypeError issue
File "/usr/local/lib/python3.7/site-packages/you_get/extractors/bilibili.py", line 214, in prepare
initial_state = json.loads(initial_state_text)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
File "/usr/local/lib/python3.7/site-packages/you_get/extractors/youtube.py", line 272, in prepare
url = self.__class__.dethrottle(self.js, url)
File "/usr/local/lib/python3.7/site-packages/you_get/extractors/youtube.py", line 104, in dethrottle
n = n_to_n(js, qs['n'][0])
File "/usr/local/lib/python3.7/site-packages/you_get/extractors/youtube.py", line 94, in n_to_n
f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1))
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 259, in escape
pattern = str(pattern, 'latin1')
TypeError: decoding to str: need a bytes-like object, NoneType found
tried bilibili and youtube, it looks like all got TypeError issue.
BiliBili worked at least very recently, YouTube downloads are broken.