mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-27 17:08:32 +00:00
A simpler and more compact way to get embed_url and embed_page at yt_dlp/extractor/thehighwire.py
Co-authored-by: doe1080 <98906116+doe1080@users.noreply.github.com>
This commit is contained in:
parent
f9f0c63fbc
commit
4ffba17e1a
@ -17,15 +17,10 @@ def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
|
||||
iframe_url = self._search_regex(
|
||||
r'<iframe[^>]+src=["\'](https?://app\.arkengine\.com/embed/[^"\']+)',
|
||||
webpage, 'iframe URL')
|
||||
video_id = self._search_regex(
|
||||
r'embed/([a-zA-Z0-9]+)', iframe_url, 'video ID')
|
||||
|
||||
player_page = self._download_webpage(
|
||||
self._EMBED_URL.format(id=video_id), video_id,
|
||||
note='Downloading player page')
|
||||
embed_url = traverse_obj(webpage, (
|
||||
{find_element(cls='ark-video-embed', html=True)},
|
||||
{extract_attributes}, 'src', {url_or_none}, {require('embed URL')}))
|
||||
embed_page = self._download_webpage(embed_url, display_id)
|
||||
|
||||
m3u8_url = self._search_regex(
|
||||
r'<source[^>]+src=["\']([^"\']+\.m3u8)',
|
||||
|
Loading…
Reference in New Issue
Block a user