소스 검색

[sportbox:embed] Add `_extract_urls`

Sergey M․ 10 년 전
부모
커밋
1436a6835e
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      youtube_dl/extractor/sportbox.py

+ 6 - 0
youtube_dl/extractor/sportbox.py

@@ -91,6 +91,12 @@ class SportBoxEmbedIE(InfoExtractor):
         'only_matching': True,
     }]
 
+    @staticmethod
+    def _extract_urls(webpage):
+        return re.findall(
+            r'<iframe[^>]+src="(https?://news\.sportbox\.ru/vdl/player[^"]+)"',
+            webpage)
+
     def _real_extract(self, url):
         video_id = self._match_id(url)