Skip to content

Commit

Permalink
[Youtube] Make n-sig throttling diagnostic up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkf committed Jul 24, 2024
1 parent 16f5bbc commit 451046d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ def _decrypt_nsig(self, n, video_id, player_url):
except JSInterpreter.Exception as e:
self.report_warning(
'%s (%s %s)' % (
'Unable to decode n-parameter: download likely to be throttled',
'Unable to decode n-parameter: expect download to be blocked or throttled',
error_to_compat_str(e),
traceback.format_exc()),
video_id=video_id)
Expand All @@ -1670,7 +1670,7 @@ def _extract_n_function_name(self, jscode):
return func_name

return self._parse_json(self._search_regex(
r'var {0}\s*=\s*(\[.+?\])\s*[,;]'.format(re.escape(func_name)), jscode,
r'var\s+{0}\s*=\s*(\[.+?\])\s*[,;]'.format(re.escape(func_name)), jscode,
'Initial JS player n function list ({0}.{1})'.format(func_name, idx)),
func_name, transform_source=js_to_json)[int(idx)]

Expand Down

0 comments on commit 451046d

Please sign in to comment.