1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-06-24 20:36:19 +00:00

Merge fd69e827b7048c2816fb2a9cab8002bec8a33af8 into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6

This commit is contained in:
vvillenave 2025-04-01 10:08:19 +02:00 committed by GitHub
commit a1470af5dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,60 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class CreaCastIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://(?:\w+\.)?creacast\.com/
(?:
channel/\w+/[^/]*iid=(?P<id>\d+)|
play.php\?k=(?P<id>[^/?#&]+)
)'''
_TESTS = [
{
'url': 'https://www.creacast.com/play.php?k=GHGGRuQfeaJ4g4r6cpGSe4',
'md5': 'a524c0a6096c583345603777596b439c',
'info_dict': {
'id': 'GHGGRuQfeaJ4g4r6cpGSe4',
'ext': 'mp4',
'title': 'Strasbourg VOD'
}
},
{
'url': 'https://www.creacast.com/channel/strasbourg/?sort=v&iid=5444&display=vod',
'md5': 'TBC',
'info_dict': {
'id': '5444',
'ext': 'mp4',
'title': 'Conseils | Strasbourg.eu'
}
}
]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
data = self._parse_json(
self._search_regex(
r'(?s)runParams\s*=\s*({.+?})\s*;?\s*var',
webpage, 'runParams'),
video_id)
formats = self._extract_m3u8_formats(
data['replyStreamUrl'], video_id, 'mp4',
entry_protocol='m3u8_native', m3u8_id='hls')
print("toto\n\n")
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
return {
'id': video_id,
'title': title,
'description': self._og_search_description(webpage),
'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False),
'formats': formats,
}

View File

@ -266,6 +266,7 @@ from .cpac import (
) )
from .cracked import CrackedIE from .cracked import CrackedIE
from .crackle import CrackleIE from .crackle import CrackleIE
from .creacast import CreaCastIE
from .crooksandliars import CrooksAndLiarsIE from .crooksandliars import CrooksAndLiarsIE
from .crunchyroll import ( from .crunchyroll import (
CrunchyrollIE, CrunchyrollIE,