don't treat direct mp4 urls as manifests

This commit is contained in:
Audrey 2024-10-11 18:32:29 -04:00
parent 9d2080ac31
commit 722ac25c98

View file

@ -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))