aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2020-11-01 06:52:00 +0700
committerSergey M․ <dstftw@gmail.com>2020-11-01 06:52:00 +0700
commit6d4733ce7be2e5bb31d1a21f68c6123074d584a0 (patch)
tree3adc6a2c53c8babc1bef4ba00e6a75167f2fe40a /youtube_dl/extractor/youtube.py
parent416da574ec0df3388f652e44f7fe71b1e3a4701f (diff)
[youtube] Fix JS player URL extraction
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index bd1515380..c31731ac0 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -2086,7 +2086,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if cipher:
if 's' in url_data or self._downloader.params.get('youtube_include_dash_manifest', True):
- ASSETS_RE = r'"assets":.+?"js":\s*("[^"]+")'
+ ASSETS_RE = (
+ r'<script[^>]+\bsrc=("[^"]+")[^>]+\bname=["\']player_ias/base',
+ r'"jsUrl"\s*:\s*("[^"]+")',
+ r'"assets":.+?"js":\s*("[^"]+")')
jsplayer_url_json = self._search_regex(
ASSETS_RE,
embed_webpage if age_gate else video_webpage,