Merge pull request #922 from JohnyMoSwag/master
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 25 Jun 2013 20:07:31 +0000 (22:07 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 25 Jun 2013 20:08:58 +0000 (22:08 +0200)
Added embedded youtube detection to WorldstarIE

youtube_dl/extractor/worldstarhiphop.py

index 54a77b69699439a3409280cdab7cbbac5b743069..531d0889fbc06273eb8a5f3a7ea7a77cc993438f 100644 (file)
@@ -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(video_url, ie='Youtube')
+
         if 'mp4' in video_url:
             ext = 'mp4'
         else: