[gamekings] Stricter checks
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 31 Jan 2016 18:19:03 +0000 (02:19 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 31 Jan 2016 18:19:03 +0000 (02:19 +0800)
youtube_dl/extractor/gamekings.py

index df385e338f6f7a9cfcb4541f6c088b5e266f091f..f6b9046f943c702262897002b07c418e3e666b3d 100644 (file)
@@ -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(