Skip to content

Commit

Permalink
[youtube] Fix sigfunc name extraction (closes #26134, closes #26135, c…
Browse files Browse the repository at this point in the history
…loses #26136, closes #26137)
  • Loading branch information
dstftw committed Jul 27, 2020
1 parent a115e07 commit e450f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ def _parse_sig_js(self, jscode):
funcname = self._search_regex(
(r'\b[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
r'\b[a-zA-Z0-9]+\s*&&\s*[a-zA-Z0-9]+\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
r'\b(?P<sig>[a-zA-Z0-9$]{2})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
r'(?:\b|[^a-zA-Z0-9$])(?P<sig>[a-zA-Z0-9$]{2})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
r'(?P<sig>[a-zA-Z0-9$]+)\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
# Obsolete patterns
r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',
Expand Down

0 comments on commit e450f6c

Please sign in to comment.