[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):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
video = self._download_json(
|
json = self._download_json(
|
||||||
'https://www.veoh.com/watch/getVideo/' + video_id,
|
'https://www.veoh.com/watch/getVideo/' + video_id,
|
||||||
video_id)['video']
|
video_id)
|
||||||
|
video = json['video']
|
||||||
title = video['title']
|
title = video['title']
|
||||||
|
|
||||||
thumbnail_url = None
|
thumbnail_url = None
|
||||||
@ -89,6 +90,8 @@ class VeohIE(InfoExtractor):
|
|||||||
})
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
tags = video.get('tags')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
@ -100,4 +103,7 @@ class VeohIE(InfoExtractor):
|
|||||||
'formats': formats,
|
'formats': formats,
|
||||||
'average_rating': int_or_none(video.get('rating')),
|
'average_rating': int_or_none(video.get('rating')),
|
||||||
'comment_count': int_or_none(video.get('numOfComments')),
|
'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