mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-12 14:26:49 +01:00
[ultimedia] Fix extraction
This commit is contained in:
parent
b813d8caf1
commit
d9d747a06a
@ -4,6 +4,7 @@
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_urllib_parse_urlparse
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
qualities,
|
||||
@ -44,9 +45,9 @@ def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
deliver_url = self._search_regex(
|
||||
r'<iframe[^>]+src="(https?://(?:www\.)?ultimedia\.com/deliver/[^"]+)"',
|
||||
webpage, 'deliver URL')
|
||||
deliver_url = self._proto_relative_url(self._search_regex(
|
||||
r'<iframe[^>]+src="((?:https?:)?//(?:www\.)?ultimedia\.com/deliver/[^"]+)"',
|
||||
webpage, 'deliver URL'), compat_urllib_parse_urlparse(url).scheme + ':')
|
||||
|
||||
deliver_page = self._download_webpage(
|
||||
deliver_url, video_id, 'Downloading iframe page')
|
||||
@ -57,7 +58,8 @@ def _real_extract(self, url):
|
||||
|
||||
player = self._parse_json(
|
||||
self._search_regex(
|
||||
r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on", deliver_page, 'player'),
|
||||
r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on",
|
||||
deliver_page, 'player'),
|
||||
video_id)
|
||||
|
||||
quality = qualities(['flash', 'html5'])
|
||||
|
Loading…
Reference in New Issue
Block a user