From 98e6231a255b3f5751f9553d0f2283ccb1d2ae82 Mon Sep 17 00:00:00 2001 From: dirkf Date: Fri, 29 Nov 2024 14:17:10 +0000 Subject: [PATCH] Further small improvements --- youtube_dl/extractor/doodstream.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/youtube_dl/extractor/doodstream.py b/youtube_dl/extractor/doodstream.py index 8dd54a0ab..0d3271186 100644 --- a/youtube_dl/extractor/doodstream.py +++ b/youtube_dl/extractor/doodstream.py @@ -78,16 +78,16 @@ class DoodStreamIE(InfoExtractor): return self._html_search_regex(r']*>([^<]+?)(?:[|-]\s+DoodStream\s*)?]*>([^<]+?)pass_md5/[\da-f-]+/(?P[\da-z]+))', webpage, 'tokens', + group=('pm', 'tok')) + headers = { + 'Referer': url, + } # construct the media link final_url = self._download_webpage( 'https://%s/%s' % (host, pass_md5), video_id, headers={ @@ -100,6 +100,7 @@ class DoodStreamIE(InfoExtractor): 'expiry': int(time_time() * 1000), }) + # get additional metadata thumb = next(filter(None, (url_or_none(self._html_search_meta(x, webpage, default=None)) for x in ('og:image', 'twitter:image'))), None) description = self._html_search_meta(