mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 11:44:33 +01:00
[EnseignerTV5Monde] new extractor (closes #22851)
This commit is contained in:
parent
300a9da662
commit
b812fcee81
44
youtube_dl/extractor/enseignertv5monde.py
Normal file
44
youtube_dl/extractor/enseignertv5monde.py
Normal file
@ -0,0 +1,44 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import unified_strdate
|
||||
|
||||
|
||||
class EnseignerTV5MondeIE(InfoExtractor):
|
||||
_VALID_URL = r'https?:\/\/(?:www\.)?enseigner\.tv5monde\.com\/videos-sans-fiche\/(?P<id>[a-zA-Z0-9\-]+)'
|
||||
_TESTS = [
|
||||
{
|
||||
'url': 'https://enseigner.tv5monde.com/videos-sans-fiche/la-culture-en-france',
|
||||
'md5': 'bb9e4c4701c1873a3790a0a33eb89ce6',
|
||||
'info_dict': {
|
||||
'id': 'la-culture-en-france',
|
||||
'ext': 'mp4',
|
||||
'title': 'La culture en France',
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
}
|
||||
},
|
||||
{
|
||||
'url': 'https://enseigner.tv5monde.com/videos-sans-fiche/les-chapeaux-de-la-maison-michel',
|
||||
'md5': 'bdfc21506aee0ffa2afd823f1c44ce66',
|
||||
'info_dict': {
|
||||
'id': 'les-chapeaux-de-la-maison-michel',
|
||||
'ext': 'mp4',
|
||||
'title': 'Les chapeaux de la Maison Michel',
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
d = self._extract_jwplayer_data(webpage, video_id, require_title=False)
|
||||
|
||||
d.update({
|
||||
'title': self._og_search_title(webpage),
|
||||
'thumbnail': self._og_search_thumbnail(webpage),
|
||||
'release_date': unified_strdate(self._html_search_regex(r'itemprop="datePublished"[^>]*>([0-9/]+)</time>', webpage, 'release date', fatal=False))})
|
||||
|
||||
return d
|
@ -321,6 +321,7 @@ from .ellentube import (
|
||||
from .elpais import ElPaisIE
|
||||
from .embedly import EmbedlyIE
|
||||
from .engadget import EngadgetIE
|
||||
from .enseignertv5monde import EnseignerTV5MondeIE
|
||||
from .eporner import EpornerIE
|
||||
from .eroprofile import EroProfileIE
|
||||
from .escapist import EscapistIE
|
||||
|
Loading…
Reference in New Issue
Block a user