1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

fixup! [ie/france24] Add extractor

This commit is contained in:
Benoit Pierre 2025-02-21 19:28:28 +01:00
parent 8573a4d2a7
commit 235fa35996

View file

@ -128,10 +128,11 @@ class France24IE(InfoExtractor):
'url': 'https://www.france24.com', 'url': 'https://www.france24.com',
'only_matching': True, 'only_matching': True,
}] }]
_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; rv:135.0) Gecko/20100101 Firefox/135.0'
def _real_extract(self, url): def _real_extract(self, url):
display_id = self._match_id(url).strip('/') display_id = self._match_id(url).strip('/')
webpage = self._download_webpage(url, None, 'Downloading video page', headers={'User-Agent': 'curl/8.12.1'}) webpage = self._download_webpage(url, None, 'Downloading video page', headers={'User-Agent': self._USER_AGENT})
entries = [] entries = []
for player in re.findall(r'<(?:youtube|video)-player\b[^>]*>', webpage): for player in re.findall(r'<(?:youtube|video)-player\b[^>]*>', webpage):
attrs = extract_attributes(player) attrs = extract_attributes(player)