Skip to content

Commit

Permalink
[youtube] Fix JS player URL extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Oct 31, 2020
1 parent 416da57 commit 6d4733c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,10 @@ def _extract_filesize(media_url):

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,
Expand Down

0 comments on commit 6d4733c

Please sign in to comment.