mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 02:42:30 +00:00
[pluzz] Fix mobile support and modernize (Closes #7305)
This commit is contained in:
parent
a526167d40
commit
0a192fbea7
@ -105,15 +105,21 @@ def _extract_video(self, video_id, catalogue):
|
|||||||
|
|
||||||
class PluzzIE(FranceTVBaseInfoExtractor):
|
class PluzzIE(FranceTVBaseInfoExtractor):
|
||||||
IE_NAME = 'pluzz.francetv.fr'
|
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
|
# Can't use tests, videos expire in 7 days
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
title = re.match(self._VALID_URL, url).group(1)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, title)
|
|
||||||
video_id = self._search_regex(
|
webpage = self._download_webpage(url, display_id)
|
||||||
r'data-diffusion="(\d+)"', webpage, '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')
|
return self._extract_video(video_id, 'Pluzz')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user