diff options
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index fd03b0d7c..29c9b1a4c 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1328,3 +1328,7 @@ US_RATINGS = { 'R': 16, 'NC': 18, } + + +def strip_jsonp(code): + return re.sub(r'(?s)^[a-zA-Z_]+\s*\(\s*(.*)\);\s*?\s*$', r'\1', code) |