]> git.bitcoin.ninja Git - youtube-dl/commitdiff
working - worldstarhiphop IE
authorJohny Mo Swag <johnymo@me.com>
Fri, 8 Mar 2013 00:27:21 +0000 (16:27 -0800)
committerJohny Mo Swag <johnymo@me.com>
Fri, 8 Mar 2013 00:27:21 +0000 (16:27 -0800)
Support for WorldStarHipHop

.gitignore
youtube_dl/InfoExtractors.py

index 77469b8a7993a9b529769452f109e8805e8b1e50..328fed8bdefa7cb7de1c2ed5269cfd5182789b8b 100644 (file)
@@ -18,3 +18,5 @@ youtube-dl.tar.gz
 cover/
 updates_key.pem
 *.egg-info
+
+*.flv
index 178b0beed441f4023106a58abf80a4e69b07dac3..f69bad4f3a77d49be2d8b9cac3c6c256f4ee9898 100755 (executable)
@@ -3655,7 +3655,7 @@ class UstreamIE(InfoExtractor):
         return [info]
 
 class WorldStarHipHopIE(InfoExtractor):
-    _VALID_URL = r"""(http://(?:www|m).worldstar(?:candy|hiphop)\.com.*)"""
+    _VALID_URL = r'http://(?:www|m)\.worldstar(?:candy|hiphop)\.com/videos/video\.php\?v=(?P<id>.*)'
     IE_NAME = u'WorldStarHipHop'
 
     def _real_extract(self, url):
@@ -3686,8 +3686,6 @@ class WorldStarHipHopIE(InfoExtractor):
             title = 'World Start Hip Hop - %s' % time.ctime()
 
         _thumbnail = r"""rel="image_src" href="(.*)" />"""
-
-        print title
         mobj = re.search(_thumbnail, webpage_src)
 
         # Getting thumbnail and if not thumbnail sets correct title for WSHH candy video.
@@ -3700,7 +3698,11 @@ class WorldStarHipHopIE(InfoExtractor):
                 title = mobj.group(1)
             thumbnail = None
 
+        m = re.match(self._VALID_URL, url)
+        video_id = m.group('id')
+        
         results = [{
+                    'id': video_id,
                     'url' : video_url,
                     'title' : title,
                     'thumbnail' : thumbnail,