1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-01 20:57:54 +01:00

[EnseignerTV5Monde] new extractor (closes #22851)

This commit is contained in:
uno20001 2019-11-02 16:25:58 +01:00
parent 300a9da662
commit b812fcee81
2 changed files with 45 additions and 0 deletions

View 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

View File

@ -321,6 +321,7 @@ from .ellentube import (
from .elpais import ElPaisIE from .elpais import ElPaisIE
from .embedly import EmbedlyIE from .embedly import EmbedlyIE
from .engadget import EngadgetIE from .engadget import EngadgetIE
from .enseignertv5monde import EnseignerTV5MondeIE
from .eporner import EpornerIE from .eporner import EpornerIE
from .eroprofile import EroProfileIE from .eroprofile import EroProfileIE
from .escapist import EscapistIE from .escapist import EscapistIE