浏览代码

[espn] Improve video id extraction (Closes #8368)

Sergey M․ 9 年之前
父节点
当前提交
83ab8a79cc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      youtube_dl/extractor/espn.py

+ 2 - 2
youtube_dl/extractor/espn.py

@@ -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: