浏览代码

[elpais] Modernize

Philipp Hagemeister 10 年之前
父节点
当前提交
b8da6b9fc6
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      youtube_dl/extractor/elpais.py

+ 1 - 5
youtube_dl/extractor/elpais.py

@@ -1,8 +1,6 @@
 # coding: utf-8
 # coding: utf-8
 from __future__ import unicode_literals
 from __future__ import unicode_literals
 
 
-import re
-
 from .common import InfoExtractor
 from .common import InfoExtractor
 from ..utils import unified_strdate
 from ..utils import unified_strdate
 
 
@@ -24,9 +22,7 @@ class ElPaisIE(InfoExtractor):
     }
     }
 
 
     def _real_extract(self, url):
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
-
+        video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
         webpage = self._download_webpage(url, video_id)
 
 
         prefix = self._html_search_regex(
         prefix = self._html_search_regex(