you-get
you-get copied to clipboard
Can't download YouTube live videos
PS C:\WINDOWS\system32> you-get https://www.youtube.com/watch?v=UCG1aXVO8H8 --debug
[DEBUG] get_content: https://www.youtube.com/watch?v=UCG1aXVO8H8
you-get: version 0.4.1545, a tiny downloader that scrapes the web.
you-get: Namespace(URL=['https://www.youtube.com/watch?v=UCG1aXVO8H8'], auto_rename=False, cookies=None, debug=True, extractor_proxy=None, first=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, insecure=False, itag=None, json=False, last=None, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, size=None, skip_existing_file_size_check=False, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
Traceback (most recent call last):
File "e:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "e:\program files\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "E:\Program Files\Python37\Scripts\you-get.exe\__main__.py", line 7, in <module>
File "e:\program files\python37\lib\site-packages\you_get\__main__.py", line 92, in main
main(**kwargs)
File "e:\program files\python37\lib\site-packages\you_get\common.py", line 1831, in main
script_main(any_download, any_download_playlist, **kwargs)
File "e:\program files\python37\lib\site-packages\you_get\common.py", line 1719, in script_main
**extra
File "e:\program files\python37\lib\site-packages\you_get\common.py", line 1345, in download_main
download(url, **kwargs)
File "e:\program files\python37\lib\site-packages\you_get\common.py", line 1822, in any_download
m.download(url, **kwargs)
File "e:\program files\python37\lib\site-packages\you_get\extractor.py", line 48, in download_by_url
self.prepare(**kwargs)
File "e:\program files\python37\lib\site-packages\you_get\extractors\youtube.py", line 269, in prepare
stream_list = ytInitialPlayerResponse['streamingData']['formats']
KeyError: 'formats'
Hello @toorich, Thanks for the Pull Request. We :heart: our contributors! Please wait for one of our human maintainers to review your patches. This may take a few days to weeks. Also, please understand that although your Pull Request may or may not be eventually merged, we value all contributions equally.
祝您健康!
The problem is that they changed the name, now there are no formats anywhere, this name has changed to adaptiveFormats
The problem is that they changed the name, now there are no formats anywhere, this name has changed to adaptiveFormats
I tried to change "formats" to "adaptiveFormats" in https://github.com/soimort/you-get/blob/develop/src/you_get/extractors/youtube.py (like line 242) , but when I run it, you-get returns an empty itag list.
$ you-get --debug https://www.youtube.com/watch?v=OMq9he-5HUU
[DEBUG] get_content: https://www.youtube.com/watch?v=OMq9he-5HUU you-get: version 0.4.1650, 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, 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=OMq9he-5HUU']) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/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.11/lib/python3.11/http/client.py", line 1283, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1329, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1038, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 976, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1448, in connect super().connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 942, in connect self.sock = self._create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/bin/you-get", line 8, in
The problem is that they changed the name, now there are no formats anywhere, this name has changed to adaptiveFormats
I tried to change "formats" to "adaptiveFormats" in https://github.com/soimort/you-get/blob/develop/src/you_get/extractors/youtube.py (like line 242) , but when I run it, you-get returns an empty itag list.
I found another bug: $ you-get --debug https://www.youtube.com/watch?v=OMq9he-5HUU
[DEBUG] get_content: https://www.youtube.com/watch?v=OMq9he-5HUU you-get: version 0.4.1650, 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, 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=OMq9he-5HUU']) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/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.11/lib/python3.11/http/client.py", line 1283, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1329, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1038, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 976, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1448, in connect super().connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 942, in connect self.sock = self._create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/bin/you-get", line 8, in