mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 23:27:45 +08:00
[veoh] Extract more metadata
This commit is contained in:
parent
35c8462479
commit
2e2104553b
@ -68,9 +68,10 @@ class VeohIE(InfoExtractor):
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
video = self._download_json(
|
||||
json = self._download_json(
|
||||
'https://www.veoh.com/watch/getVideo/' + video_id,
|
||||
video_id)['video']
|
||||
video_id)
|
||||
video = json['video']
|
||||
title = video['title']
|
||||
|
||||
thumbnail_url = None
|
||||
@ -89,6 +90,8 @@ class VeohIE(InfoExtractor):
|
||||
})
|
||||
self._sort_formats(formats)
|
||||
|
||||
tags = video.get('tags')
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
@ -100,4 +103,7 @@ class VeohIE(InfoExtractor):
|
||||
'formats': formats,
|
||||
'average_rating': int_or_none(video.get('rating')),
|
||||
'comment_count': int_or_none(video.get('numOfComments')),
|
||||
'age_limit': 18 if video.get('contentRatingId') == 2 else 0,
|
||||
'categories': json.get('categoryPath'),
|
||||
'tags': tags.split(', ') if tags else None,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user