-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
Fixes #29326, closes #29790, closes #30004, closes #30024, closes #30052, closes #30088, closes #30097, closes #30102, closes #30109, closes #30119, closes #30125, closes #30128, closes #30162, closes #30173, closes #30186, closes #30192, closes #30221, closes #30239, closes #30539, closes #30552.
- Loading branch information
There are no files selected for viewing
6 comments
on commit af9e725
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you considering making a new release based on these recent changes alone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as possible, but no sooner ...
To be less cryptic, I need to reach an understanding of the whole release process and especially the Windows end of it, since the Windows build would probably be the most valuable part of the release for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, makes sense. Don't forget to look how yt-dlp is doing their builds nowadays, since I seem to recall they modernized the whole workflow quite a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous devs were building the windows release with wine (I don't know the exact process) and releasing with devscripts/create-github-releases.py
. If you have a windows machine, you can just do setup.py py2exe
instead. But in the long term, I recommend moving the release process to GH actions like yt-dlp. Once set up properly, it makes it much easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see youtube-dl not being throttled. But a note here:
youtube has its player updated recently.
To get this run correctly, I have to make a patch, as what yt-dlp recent committed.
[youtube] Fix n-sig for player e06dea74
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 797c35fd5..520efc17a 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1004,6 +1004,8 @@ class InfoExtractor(object):
if group is None:
# return the first matching group
return next(g for g in mobj.groups() if g is not None)
+ elif isinstance(group, (list, tuple)):
+ return tuple(mobj.group(g) for g in group)
else:
return mobj.group(group)
elif default is not NO_DEFAULT:
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 63918924d..0ad467aa3 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -28,6 +28,7 @@ from ..utils import (
dict_get,
float_or_none,
int_or_none,
+ js_to_json,
mimetype2ext,
parse_codecs,
parse_duration,
@@ -1391,9 +1392,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
# 2. https://code.videolan.org/videolan/vlc/-/blob/4fb284e5af69aa9ac2100ccbdd3b88debec9987f/share/lua/playlist/youtube.lua#L116
# 3. https://github.com/ytdl-org/youtube-dl/issues/30097#issuecomment-950157377
def _extract_n_function_name(self, jscode):
- return self._search_regex(
- (r'\.get\("n"\)\)&&\(b=(?P<nfunc>[a-zA-Z0-9$]{3})\([a-zA-Z0-9]\)',),
- jscode, 'Initial JS player n function name', group='nfunc')
+ nfunc, idx = self._search_regex(
+ r'\.get\("n"\)\)&&\(b=(?P<nfunc>[a-zA-Z0-9$]{3})(\[(?P<idx>\d+)\])?\([a-zA-Z0-9]\)',
+ jscode, 'Initial JS player n function name', group=('nfunc', 'idx'))
+ if not idx:
+ return nfunc
+ return json.loads(js_to_json(self._search_regex(
+ r'var {}\s*=\s*(\[.+?\]);'.format(nfunc), jscode,
+ 'Initial JS player n function list ({}.{})'.format(nfunc, idx))))[int(idx)]
def _extract_n_function(self, video_id, player_url):
player_id = self._extract_player_info(player_url)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A full yt-dl update is about to appear, without f''
, and without changing search_regex()
(the change is a good thing, though, and should be adopted in a partial back-port of extractor/common.py
soon).
A new player breaks this: yt-dlp/yt-dlp@48416bc