Skip to content

Commit

Permalink
Fix not being able to download video behind login in format https://h…
Browse files Browse the repository at this point in the history
…ost/Mediasite/Channel/channel_id/watch/resource_id

Maybe only works where the channel_id in the url == MediasiteChannelId
  • Loading branch information
flanter21 committed Jan 24, 2025
1 parent 9fb45c6 commit 78321ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion yt_dlp/extractor/mediasite.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class MediasiteIE(InfoExtractor):
_VALID_URL = rf'''(?xi)https?://[^/]+/Mediasite/(?:Play
|Showcase/[^/#?]+/Presentation
|Channel/[^/#?]+/watch
|Channel/(?P<channel>[^/#?]+)/watch
)/(?P<id>{_ID_RE})(?P<query>\?[^#]+|)'''
_EMBED_REGEX = [rf'(?xi)<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:(?:https?:)?//[^/]+)?/Mediasite/Play/{_ID_RE}(?:\?.*?)?)\1']
_TESTS = [
Expand Down Expand Up @@ -260,6 +260,11 @@ def _real_extract(self, url):
mobj = self._match_valid_url(url)
resource_id = mobj.group('id')
query = mobj.group('query')
channel = mobj.group('channel')

print (query)

Check failure on line 265 in yt_dlp/extractor/mediasite.py

View workflow job for this annotation

GitHub Actions / Code check

Ruff (T201)

yt_dlp/extractor/mediasite.py:265:9: T201 `print` found
if query == '':
query = '?Collection=' + channel

webpage, urlh = self._download_webpage_handle(url, resource_id) # XXX: add UrlReferrer?
redirect_url = urlh.url
Expand Down

0 comments on commit 78321ce

Please sign in to comment.