Checklist
Author: dirkf <fieldhouse@gmx.net> 2022-04-10 12:49:09
Committer: GitHub <noreply@github.com> 2022-04-10 12:49:09
Parent: 871645a4a4a0e12ec8f7bf78a3ad7bf75838ee5c ([RAI] Fix extraction of http formats)
Child: 0000000000000000000000000000000000000000 (Local uncommitted changes, not checked in to index)
Branches: master, remotes/origin/master
Follows: 2021.12.17
Precedes:
Disable blank issues
Verbose log
[youtube] f3vYFg1tM-0: Downloading webpage
[youtube] f3vYFg1tM-0: Downloading player fae06c11
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unable to extract Initial JS player n function name; 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-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "E:\work\01_youtubedl\rep\youtube-dl\youtube_dl\extractor\youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "E:\work\01_youtubedl\rep\youtube-dl\youtube_dl\extractor\youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "E:\work\01_youtubedl\rep\youtube-dl\youtube_dl\extractor\youtube.py", line 1470, in _extract_n_function_name
jscode, 'Initial JS player n function name')
File "E:\work\01_youtubedl\rep\youtube-dl\youtube_dl\extractor\common.py", line 1012, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player n function name; 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-dl with the --verbose flag and include its complete output.
)
Description
- test video link is https://www.youtube.com/watch?v=f3vYFg1tM-0
- following is ‘_n_descramble’ function’s parameters
n_param:'9nHkIgOzxZyYvA0FueY'
player_url:'https://www.youtube.com/s/player/fae06c11/player_ias.vflset/en_US/base.js'
video_id:'f3vYFg1tM-0'
Required patch that will be committed shortly:
There were two issues:
$
which needed to be escaped when used in a regex.In fixing these I’ve made the patterns match any valid JS identifier so as to avoid future surprises.
The (potential) issues were fixed in https://github.com/yt-dlp/yt-dlp/commit/c571b3a6ab981d7287c2d3575b50b8f63dd830d8 and https://github.com/yt-dlp/yt-dlp/commit/a7d4acc018378b30188685776e954168e041fa4f respectively.
Sorry, first I misunderstood and thought I need to checkout another branch, I just had to pull the master, everything works as expected. Thank you. I reallly appreciate the lots of work you guys put in