Browse Source

added Youtube embed detection to WorldstarIE

Johny Mo Swag 12 năm trước cách đây
mục cha
commit
d18596baf4
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      youtube_dl/extractor/worldstarhiphop.py

+ 4 - 0
youtube_dl/extractor/worldstarhiphop.py

@@ -16,6 +16,10 @@ class WorldStarHipHopIE(InfoExtractor):
         video_url = self._search_regex(r'so\.addVariable\("file","(.*?)"\)',
             webpage_src, u'video URL')
 
+        if 'youtube' in video_url:
+            self.to_screen(u'Youtube video detected:')
+            return self.url_result('%s' % video_url, ie='Youtube')
+
         if 'mp4' in video_url:
             ext = 'mp4'
         else: