Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloader for slide streams #343

Closed
wants to merge 13 commits into from
4 changes: 2 additions & 2 deletions yt_dlp/downloader/mhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def real_download(self, filename, info_dict):
fragment_base_url = info_dict.get('fragment_base_url')
fragments = info_dict['fragments'][:1] if self.params.get(
'test', False) else info_dict['fragments']
title = info_dict['_download_params'].get('title', fragment_base_url)
origin = info_dict['_download_params'].get('origin')
title = info_dict['title']
origin = info_dict['webpage_url']

ctx = {
'filename': filename,
Expand Down
9 changes: 1 addition & 8 deletions yt_dlp/extractor/mediasite.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _extract_urls(webpage):
r'(?xi)<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:(?:https?:)?//[^/]+)?/Mediasite/Play/%s(?:\?.*?)?)\1' % _ID_RE,
webpage)]

def __extract_slides(self, *, stream_id, snum, Stream, duration, images, title, origin):
def __extract_slides(self, *, stream_id, snum, Stream, duration, images):
slide_base_url = Stream['SlideBaseUrl']

fname_template = Stream['SlideImageFileNameTemplate']
Expand Down Expand Up @@ -167,11 +167,6 @@ def __extract_slides(self, *, stream_id, snum, Stream, duration, images, title,
'format_note': 'Slides',
'fragments': fragments,
'fragment_base_url': slide_base_url,
'_download_params': {
'duration': duration,
fstirlitz marked this conversation as resolved.
Show resolved Hide resolved
'title': title,
'origin': origin,
},
}

def _real_extract(self, url):
Expand Down Expand Up @@ -258,8 +253,6 @@ def _real_extract(self, url):
Stream=Stream,
duration=presentation.get('Duration'),
images=images,
title=title,
origin=url
))

# disprefer 'secondary' streams
Expand Down