1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-17 18:58:35 +00:00
This commit is contained in:
JChris246 2025-07-16 02:10:49 +00:00 committed by GitHub
commit 32bbe4cdc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,8 +22,23 @@ class FC2IE(InfoExtractor):
'md5': 'a6ebe8ebe0396518689d963774a54eb7',
'info_dict': {
'id': '20121103kUan1KHs',
'ext': 'flv',
'title': 'Boxing again with Puff',
'ext': 'mp4',
'thumbnail': r're:https?://.+\.jpe?g',
},
'params': {
'skip_download': 'm3u8',
},
}, {
# Direct video url
'url': 'https://video.fc2.com/content/20121129xMeT3Czt',
'md5': '19109bbee429d5b3765986505d44a012',
'info_dict': {
'id': '20121129xMeT3Czt',
'title': 'Rotfux',
'ext': 'mp4',
'thumbnail': r're:https?://.+\.jpe?g',
'description': 'Rotfux',
},
}, {
'url': 'http://video.fc2.com/en/content/20150125cEva0hDn/',
@ -99,12 +114,18 @@ def _real_extract(self, url):
raise ExtractorError('Unable to extract video URL')
vid_url = urljoin('https://video.fc2.com/', vid_url)
if vidplaylist.get('type') == '1':
formats = self._extract_m3u8_formats(vid_url, video_id, 'mp4')
else:
formats = [{
'url': vid_url,
'ext': 'mp4',
}]
return {
'id': video_id,
'title': title,
'url': vid_url,
'ext': 'mp4',
'protocol': 'm3u8_native',
'formats': formats,
'description': description,
'thumbnail': thumbnail,
}