[flickr] extract views_count and tags
authorremitamine <remitamine@gmail.com>
Sun, 20 Dec 2015 23:20:22 +0000 (00:20 +0100)
committerremitamine <remitamine@gmail.com>
Sun, 20 Dec 2015 23:20:22 +0000 (00:20 +0100)
youtube_dl/extractor/flickr.py

index 92d2ac55393d708de36a3b624e7f36920aa6a67b..452b27b260523541da2dc4d10948b74f9e4e5d4f 100644 (file)
@@ -25,6 +25,8 @@ class FlickrIE(InfoExtractor):
             'uploader_id': '10922353@N03',
             'uploader': 'Forest Wander',
             'comment_count': int,
+            'view_count': int,
+            'tags': list,
         }
     }
 
@@ -78,6 +80,8 @@ class FlickrIE(InfoExtractor):
                 'uploader_id': owner.get('nsid'),
                 'uploader': owner.get('realname'),
                 'comment_count': int_or_none(video_info.get('comments', {}).get('_content')),
+                'view_count': int_or_none(video_info.get('views')),
+                'tags': [tag.get('_content') for tag in video_info.get('tags', {}).get('tag', [])]
             }
         else:
             raise ExtractorError('not a video', expected=True)