Closed nsapa closed 3 years ago
downgrade to Youtube-dlc to 2020.10.26
I downgraded youtube-dlc to version 2020.10.26 on another computer that have the same issue:
$ pip3 install --user youtube-dlc==2020.10.26
Collecting youtube-dlc==2020.10.26
Downloading https://files.pythonhosted.org/packages/cb/a3/2b8539b821cfe251e3eb8a9a56a95737ef5e254b5a74a8799a6c0d51f1e7/youtube_dlc-2020.10.26-py2.py3-none-any.whl (1.8MB)
|████████████████████████████████| 1.8MB 2.0MB/s
Installing collected packages: youtube-dlc
Found existing installation: youtube-dlc 2020.10.31
Uninstalling youtube-dlc-2020.10.31:
Successfully uninstalled youtube-dlc-2020.10.31
Successfully installed youtube-dlc-2020.10.26
But it look like this version doesn't work witht the current JS player URL:
$ tubeup 'https://youtube.com/watch?v=JyE9OF03cao'
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dlc version 2020.10.26
[debug] Python version 3.7.9 (CPython) - Linux-5.8.6-101.fc31.x86_64-x86_64-with-fedora-31-Thirty_One
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/YoutubeDL.py", line 830, in extract_info
ie_result = ie.extract(url)
File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/common.py", line 532, in extract
ie_result = self._real_extract(url)
File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/youtube.py", line 2066, in _real_extract
ASSETS_RE, embed_webpage, 'JS player URL')
File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/common.py", line 1010, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dlc.utils.RegexNotFoundError: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.
An exception just occured, if you found this exception isn't related with any of your connection problem, please report this issue to https://github.com/bibanon/tubeup/issues
Traceback (most recent call last):
File "/home/nico/.local/lib/python3.7/site-packages/tubeup/__main__.py", line 96, in main
use_download_archive):
File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 367, in archive_urls
urls, proxy, ydl_username, ydl_password, use_download_archive)
File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 154, in get_resource_basenames
self.create_basenames_from_ydl_info_dict(ydl, info_dict)
File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 173, in create_basenames_from_ydl_info_dict
info_type = info_dict.get('_type', 'video')
AttributeError: 'NoneType' object has no attribute 'get'
then wait for a new version of ytdlc, IIRC he's working on overhauling the YT extractor.
Or downgrade Tubeup to use YouTube-dl, which is decaying code that isn't being defended.
Either way it's easily fixed.
Sent from ProtonMail mobile
-------- Original Message -------- On Oct 31, 2020, 10:22 PM, Nicolas SAPA wrote:
I downgraded youtube-dlc to version 2020.10.26 on another computer that have the same issue:
$ pip3 install --user youtube-dlc==2020.10.26 Collecting youtube-dlc==2020.10.26 Downloading https://files.pythonhosted.org/packages/cb/a3/2b8539b821cfe251e3eb8a9a56a95737ef5e254b5a74a8799a6c0d51f1e7/youtube_dlc-2020.10.26-py2.py3-none-any.whl (1.8MB) |████████████████████████████████| 1.8MB 2.0MB/s Installing collected packages: youtube-dlc Found existing installation: youtube-dlc 2020.10.31 Uninstalling youtube-dlc-2020.10.31: Successfully uninstalled youtube-dlc-2020.10.31 Successfully installed youtube-dlc-2020.10.26
But it look like this version doesn't work witht the current JS player URL:
$ tubeup 'https://youtube.com/watch?v=JyE9OF03cao' [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dlc version 2020.10.26 [debug] Python version 3.7.9 (CPython) - Linux-5.8.6-101.fc31.x86_64-x86_64-with-fedora-31-Thirty_One [debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4 [debug] Proxy map: {} ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output. Traceback (most recent call last): File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/YoutubeDL.py", line 830, in extract_info ie_result = ie.extract(url) File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/common.py", line 532, in extract ie_result = self._real_extract(url) File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/youtube.py", line 2066, in _real_extract ASSETS_RE, embed_webpage, 'JS player URL') File "/home/nico/.local/lib/python3.7/site-packages/youtube_dlc/extractor/common.py", line 1010, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name) youtube_dlc.utils.RegexNotFoundError: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.
An exception just occured, if you found this exception isn't related with any of your connection problem, please report this issue to https://github.com/bibanon/tubeup/issues Traceback (most recent call last): File "/home/nico/.local/lib/python3.7/site-packages/tubeup/main.py", line 96, in main use_download_archive): File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 367, in archive_urls urls, proxy, ydl_username, ydl_password, use_download_archive) File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 154, in get_resource_basenames self.create_basenames_from_ydl_info_dict(ydl, info_dict) File "/home/nico/.local/lib/python3.7/site-packages/tubeup/TubeUp.py", line 173, in create_basenames_from_ydl_info_dict info_type = info_dict.get('_type', 'video') AttributeError: 'NoneType' object has no attribute 'get'
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
YouTube-DL also fail.
I traced the code and I now understand why this failed with Tubeup and why just calling youtube-dlc was working. Tubeup is requesting all metadata and youtube-dlc have an issue parsing Youtube' live chat replay on this video.
A quick hack to make it works on the version currently on pip (2020.10.31):
diff -ur Dev/yt-dlc/youtube_dlc/downloader/common.py /home/nico/.local/lib/python3.7/site-packages/youtube_dlc/downloader/common.py
--- Dev/yt-dlc/youtube_dlc/downloader/common.py 2020-11-01 04:39:52.821741685 +0100
+++ /home/nico/.local/lib/python3.7/site-packages/youtube_dlc/downloader/common.py 2020-11-01 04:30:42.114133101 +0100
@@ -364,7 +364,10 @@
else '%.2f' % sleep_interval))
time.sleep(sleep_interval)
else:
- sleep_interval_sub = self.params.get('sleep_interval_subtitles')
+ if self.params.get('sleep_interval_subtitles'):
+ sleep_interval_sub = self.params.get('sleep_interval_subtitles')
+ else:
+ sleep_interval_sub = 0
self.to_screen(
'[download] Sleeping %s seconds...' % (
int(sleep_interval_sub)))
diff -ur Dev/yt-dlc/youtube_dlc/downloader/youtube_live_chat.py /home/nico/.local/lib/python3.7/site-packages/youtube_dlc/downloader/youtube_live_chat.py
--- Dev/yt-dlc/youtube_dlc/downloader/youtube_live_chat.py 2020-10-24 22:28:29.220457035 +0200
+++ /home/nico/.local/lib/python3.7/site-packages/youtube_dlc/downloader/youtube_live_chat.py 2020-11-01 04:35:52.820793968 +0100
@@ -82,7 +82,10 @@
offset = int(replay_chat_item_action['videoOffsetTimeMsec'])
processed_fragment.extend(
json.dumps(action, ensure_ascii=False).encode('utf-8') + b'\n')
- continuation_id = live_chat_continuation['continuations'][0]['liveChatReplayContinuationData']['continuation']
+ try:
+ continuation_id = live_chat_continuation['continuations'][0]['liveChatReplayContinuationData']['continuation']
+ except KeyError:
+ continuation_id = None
self._append_fragment(ctx, processed_fragment)
Maybe TubeUp should have an option to disable all these optional metadata?
Best regards, NS
This is a site extractor problem with both_ youtube-dl and youtube-dlc for youtube. This is not out problem. My switch from ytdl to ytdlc was because ytdl was rotting before it was taken down. It's in a critically bad state rn.
Ytdlc author needs to update his extractor.
Closing.
Hello,
I am trying to mirror this video. The command I use is:
tubeup 'https://youtube.com/watch?v=JyE9OF03cao'
I've this result:Youtube-dlc is up-to-date and is able to get this video:
Do you need anything else to debug this issue?
Best regards, NS