Explorar o código

[sportbox:embed] Add `_extract_urls`

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
1436a6835e
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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,
         '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):
     def _real_extract(self, url):
         video_id = self._match_id(url)
         video_id = self._match_id(url)