mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 07:51:26 +01:00
Compare commits
No commits in common. "13a6f663c7e4f165efd1e3be0a2b50b9de14bdde" and "adee139b72a0b0cde4a41cb78d028c87155d3576" have entirely different histories.
13a6f663c7
...
adee139b72
|
@ -11,7 +11,6 @@ from ..utils import (
|
|||
ExtractorError,
|
||||
InAdvancePagedList,
|
||||
int_or_none,
|
||||
remove_start,
|
||||
traverse_obj,
|
||||
update_url_query,
|
||||
url_or_none,
|
||||
|
@ -40,11 +39,11 @@ class VideoKenBaseIE(InfoExtractor):
|
|||
if not video_url and not video_id:
|
||||
return
|
||||
elif not video_url or 'embed/sign-in' in video_url:
|
||||
video_url = f'https://slideslive.com/embed/{remove_start(video_id, "slideslive-")}'
|
||||
video_url = f'https://slideslive.com/embed/{video_id.lstrip("slideslive-")}'
|
||||
if url_or_none(referer):
|
||||
return update_url_query(video_url, {
|
||||
'embed_parent_url': referer,
|
||||
'embed_container_origin': f'https://{urllib.parse.urlparse(referer).hostname}',
|
||||
'embed_container_origin': f'https://{urllib.parse.urlparse(referer).netloc}',
|
||||
})
|
||||
return video_url
|
||||
|
||||
|
@ -58,12 +57,12 @@ class VideoKenBaseIE(InfoExtractor):
|
|||
video_url = video_id
|
||||
ie_key = 'Youtube'
|
||||
else:
|
||||
video_url = traverse_obj(video, 'embed_url', 'embeddableurl', expected_type=url_or_none)
|
||||
if not video_url:
|
||||
continue
|
||||
elif urllib.parse.urlparse(video_url).hostname == 'slideslive.com':
|
||||
video_url = traverse_obj(video, 'embed_url', 'embeddableurl')
|
||||
if urllib.parse.urlparse(video_url).netloc == 'slideslive.com':
|
||||
ie_key = SlidesLiveIE
|
||||
video_url = self._create_slideslive_url(video_url, video_id, url)
|
||||
if not video_url:
|
||||
continue
|
||||
yield self.url_result(video_url, ie_key, video_id)
|
||||
|
||||
|
||||
|
@ -179,7 +178,7 @@ class VideoKenIE(VideoKenBaseIE):
|
|||
return self.url_result(
|
||||
self._create_slideslive_url(None, video_id, url), SlidesLiveIE, video_id)
|
||||
elif re.match(r'^[\w-]{11}$', video_id):
|
||||
return self.url_result(video_id, 'Youtube', video_id)
|
||||
self.url_result(video_id, 'Youtube', video_id)
|
||||
else:
|
||||
raise ExtractorError('Unable to extract without VideoKen API response')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user