aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/francetv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-10-27 21:43:29 +0600
committerSergey M․ <dstftw@gmail.com>2015-10-27 21:43:29 +0600
commit0a192fbea798c843ad6fef37106901d431f39b6e (patch)
tree040c600169eca9c5903732dc9bd11fa40977a327 /youtube_dl/extractor/francetv.py
parenta526167d40983e47231d10c09c9f9064e0298604 (diff)
[pluzz] Fix mobile support and modernize (Closes #7305)
Diffstat (limited to 'youtube_dl/extractor/francetv.py')
-rw-r--r--youtube_dl/extractor/francetv.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py
index d63dc4d7c..00a80ba61 100644
--- a/youtube_dl/extractor/francetv.py
+++ b/youtube_dl/extractor/francetv.py
@@ -105,15 +105,21 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
class PluzzIE(FranceTVBaseInfoExtractor):
IE_NAME = 'pluzz.francetv.fr'
- _VALID_URL = r'https?://(?:m\.)?pluzz\.francetv\.fr/videos/(.*?)\.html'
+ _VALID_URL = r'https?://(?:m\.)?pluzz\.francetv\.fr/videos/(?P<id>.+?)\.html'
# Can't use tests, videos expire in 7 days
def _real_extract(self, url):
- title = re.match(self._VALID_URL, url).group(1)
- webpage = self._download_webpage(url, title)
- video_id = self._search_regex(
- r'data-diffusion="(\d+)"', webpage, 'ID')
+ display_id = self._match_id(url)
+
+ webpage = self._download_webpage(url, display_id)
+
+ video_id = self._html_search_meta(
+ 'id_video', webpage, 'video id', default=None)
+ if not video_id:
+ video_id = self._search_regex(
+ r'data-diffusion=["\'](\d+)', webpage, 'video id')
+
return self._extract_video(video_id, 'Pluzz')