Jelajahi Sumber

[gamekings] Stricter checks

Yen Chi Hsuan 9 tahun lalu
induk
melakukan
0e1b1a011d
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      youtube_dl/extractor/gamekings.py

+ 3 - 2
youtube_dl/extractor/gamekings.py

@@ -6,6 +6,7 @@ from ..utils import (
     xpath_text,
     xpath_with_ns,
 )
+from .youtube import YoutubeIE
 
 
 class GamekingsIE(InfoExtractor):
@@ -47,10 +48,10 @@ class GamekingsIE(InfoExtractor):
         webpage = self._download_webpage(url, video_id)
 
         playlist_id = self._search_regex(
-            r'gogoVideo\(.*,\s*"([^"]+)', webpage, 'playlist id')
+            r'gogoVideo\([^,]+,\s*"([^"]+)', webpage, 'playlist id')
 
         # Check if a YouTube embed is used
-        if playlist_id.find('youtube') != -1:
+        if YoutubeIE.suitable(playlist_id):
             return self.url_result(playlist_id, ie='Youtube')
 
         playlist = self._download_xml(