]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[franceculture] Fix extraction (closes #24204)
authorSergey M․ <dstftw@gmail.com>
Sun, 1 Mar 2020 12:22:09 +0000 (19:22 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 1 Mar 2020 12:22:09 +0000 (19:22 +0700)
youtube_dl/extractor/franceculture.py

index b8fa175880f47d6050e4fa3908994bd9777131ac..306b45fc99a4c3495a233d8fb3c649032641d87a 100644 (file)
@@ -31,7 +31,13 @@ class FranceCultureIE(InfoExtractor):
         webpage = self._download_webpage(url, display_id)
 
         video_data = extract_attributes(self._search_regex(
-            r'(?s)<div[^>]+class="[^"]*?(?:title-zone-diffusion|heading-zone-(?:wrapper|player-button))[^"]*?"[^>]*>.*?(<button[^>]+data-asset-source="[^"]+"[^>]+>)',
+            r'''(?sx)
+                (?:
+                    </h1>|
+                    <div[^>]+class="[^"]*?(?:title-zone-diffusion|heading-zone-(?:wrapper|player-button))[^"]*?"[^>]*>
+                ).*?
+                (<button[^>]+data-asset-source="[^"]+"[^>]+>)
+            ''',
             webpage, 'video data'))
 
         video_url = video_data['data-asset-source']