]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Add categories
authorCkuT <s3cu@hotmail.fr>
Wed, 15 Oct 2014 20:34:35 +0000 (22:34 +0200)
committerCkuT <s3cu@hotmail.fr>
Wed, 15 Oct 2014 20:34:35 +0000 (22:34 +0200)
youtube_dl/extractor/sexykarma.py

index ac7745e74e7f9f2259f3bf998c3f7dec34c6d1b5..629499e72356d66d6032a598af3304d39cfd2bb1 100644 (file)
@@ -56,6 +56,8 @@ class SexyKarmaIE(InfoExtractor):
         d = datetime.datetime.strptime(date, '%B %d, %Y')
         upload_date = d.strftime('%Y%m%d')
 
+        categories = re.findall(r'http://www.sexykarma.com/gonewild/search/video/(?:.+?)"><span>(.*?)</span>', webpage)
+
         return {
             'id': video_id,
             'title': title,
@@ -65,6 +67,7 @@ class SexyKarmaIE(InfoExtractor):
             'duration': duration,
             'view_count': view_count,
             'upload_date': upload_date,
+            'categories': categories,
         }
 
     def _to_seconds(self, timestr):