瀏覽代碼

[tagesschau] Modernize

Philipp Hagemeister 10 年之前
父節點
當前提交
122c2f87c1
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      youtube_dl/extractor/tagesschau.py

+ 2 - 8
youtube_dl/extractor/tagesschau.py

@@ -28,14 +28,8 @@ class TagesschauIE(InfoExtractor):
     }
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
-
-        if video_id.startswith('-'):
-            display_id = video_id.strip('-')
-        else:
-            display_id = video_id
-
+        video_id = self._match_id(url)
+        display_id = video_id.lstrip('-')
         webpage = self._download_webpage(url, display_id)
 
         playerpage = self._download_webpage(