From 722ac25c98e3d361bc02abccf9e3b92c3d1c6be8 Mon Sep 17 00:00:00 2001 From: Audrey <45548254+tntmod54321@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:32:29 -0400 Subject: [PATCH] don't treat direct mp4 urls as manifests --- yt_dlp/extractor/bannedvideo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/bannedvideo.py b/yt_dlp/extractor/bannedvideo.py index f77431a77..0726f42b9 100644 --- a/yt_dlp/extractor/bannedvideo.py +++ b/yt_dlp/extractor/bannedvideo.py @@ -1,5 +1,6 @@ import itertools import json +import re from .common import InfoExtractor from ..utils import ( @@ -165,7 +166,7 @@ class BannedVideoIE(BannedVideoBaseIE): 'description': 'md5:560d96f02abbebe6c6b78b47465f6b28', 'upload_date': '20200324', 'timestamp': 1585087895, - } + }, }] def _get_comments(self, video_id, comments, comment_data): @@ -204,7 +205,7 @@ def _real_extract(self, url): 'url': video_info.get('directUrl'), 'ext': 'mp4', }] if url_or_none(video_info.get('directUrl')) else [] - if video_info.get('streamUrl'): + if video_info.get('streamUrl') and not re.search(r'\.mp4$', video_info.get('streamUrl') or ''): formats.extend(self._extract_m3u8_formats( video_info.get('streamUrl'), video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', live=True))