[espn] Improve video id extraction (Closes #8368)
authorSergey M․ <dstftw@gmail.com>
Fri, 29 Jan 2016 19:48:54 +0000 (01:48 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 29 Jan 2016 19:48:54 +0000 (01:48 +0600)
youtube_dl/extractor/espn.py

index 3762d874896487cc5a1ba12c18678f00ea043bd0..db4b263bcbf40a9cb133d2a9729e4fe07292bae3 100644 (file)
@@ -53,8 +53,8 @@ class ESPNIE(InfoExtractor):
         webpage = self._download_webpage(url, video_id)
 
         video_id = self._search_regex(
-            r'class="video-play-button"[^>]+data-id="(\d+)',
-            webpage, 'video id')
+            r'class=(["\']).*?video-play-button.*?\1[^>]+data-id=["\'](?P<id>\d+)',
+            webpage, 'video id', group='id')
 
         cms = 'espn'
         if 'data-source="intl"' in webpage: