aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/francetv.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2018-05-31 11:40:37 +0100
committerRemita Amine <remitamine@gmail.com>2018-05-31 11:40:37 +0100
commit3a8e3730c198dd7cb8be76f04d101c66361da6b9 (patch)
tree0af7f5e349fd6d4154bba8d5d0a541383fb9b2de /youtube_dl/extractor/francetv.py
parentacca2ac7f3f4c78bce775d47736caa63e6872e26 (diff)
[francetv] add support for sport.francetvinfo.fr(closes #15645)
Diffstat (limited to 'youtube_dl/extractor/francetv.py')
-rw-r--r--youtube_dl/extractor/francetv.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py
index c02cd03de..6fc6b0da0 100644
--- a/youtube_dl/extractor/francetv.py
+++ b/youtube_dl/extractor/francetv.py
@@ -379,6 +379,31 @@ class FranceTVInfoIE(FranceTVBaseInfoExtractor):
return self._make_url_result(video_id, catalogue)
+class FranceTVInfoSportIE(FranceTVBaseInfoExtractor):
+ IE_NAME = 'sport.francetvinfo.fr'
+ _VALID_URL = r'https?://sport\.francetvinfo\.fr/(?:[^/]+/)*(?P<id>[^/?#&]+)'
+ _TESTS = [{
+ 'url': 'https://sport.francetvinfo.fr/les-jeux-olympiques/retour-sur-les-meilleurs-moments-de-pyeongchang-2018',
+ 'info_dict': {
+ 'id': '6e49080e-3f45-11e8-b459-000d3a2439ea',
+ 'ext': 'mp4',
+ 'title': 'Retour sur les meilleurs moments de Pyeongchang 2018',
+ 'timestamp': 1523639962,
+ 'upload_date': '20180413',
+ },
+ 'params': {
+ 'skip_download': True,
+ },
+ 'add_ie': [FranceTVIE.ie_key()],
+ }]
+
+ def _real_extract(self, url):
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+ video_id = self._search_regex(r'data-video="([^"]+)"', webpage, 'video_id')
+ return self._make_url_result(video_id, 'Sport-web')
+
+
class GenerationWhatIE(InfoExtractor):
IE_NAME = 'france2.fr:generation-what'
_VALID_URL = r'https?://generation-what\.francetv\.fr/[^/]+/video/(?P<id>[^/?#&]+)'