mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 03:32:05 +00:00
[thescene] Extract more metadata
This commit is contained in:
parent
51ed496307
commit
441d7a32e5
1 changed files with 19 additions and 3 deletions
|
@ -3,7 +3,10 @@ from __future__ import unicode_literals
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
from ..compat import compat_urlparse
|
from ..compat import compat_urlparse
|
||||||
from ..utils import qualities
|
from ..utils import (
|
||||||
|
int_or_none,
|
||||||
|
qualities,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TheSceneIE(InfoExtractor):
|
class TheSceneIE(InfoExtractor):
|
||||||
|
@ -16,6 +19,11 @@ class TheSceneIE(InfoExtractor):
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Narciso Rodriguez: Spring 2013 Ready-to-Wear',
|
'title': 'Narciso Rodriguez: Spring 2013 Ready-to-Wear',
|
||||||
'display_id': 'narciso-rodriguez-spring-2013-ready-to-wear',
|
'display_id': 'narciso-rodriguez-spring-2013-ready-to-wear',
|
||||||
|
'duration': 127,
|
||||||
|
'series': 'Style.com Fashion Shows',
|
||||||
|
'season': 'Ready To Wear Spring 2013',
|
||||||
|
'tags': list,
|
||||||
|
'categories': list,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +43,9 @@ class TheSceneIE(InfoExtractor):
|
||||||
r'(?m)video\s*:\s*({.+?}),$', player, 'info json'),
|
r'(?m)video\s*:\s*({.+?}),$', player, 'info json'),
|
||||||
display_id)
|
display_id)
|
||||||
|
|
||||||
|
video_id = info['id']
|
||||||
|
title = info['title']
|
||||||
|
|
||||||
qualities_order = qualities(('low', 'high'))
|
qualities_order = qualities(('low', 'high'))
|
||||||
formats = [{
|
formats = [{
|
||||||
'format_id': '{0}-{1}'.format(f['type'].split('/')[0], f['quality']),
|
'format_id': '{0}-{1}'.format(f['type'].split('/')[0], f['quality']),
|
||||||
|
@ -44,9 +55,14 @@ class TheSceneIE(InfoExtractor):
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': info['id'],
|
'id': video_id,
|
||||||
'display_id': display_id,
|
'display_id': display_id,
|
||||||
'title': info['title'],
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': info.get('poster_frame'),
|
'thumbnail': info.get('poster_frame'),
|
||||||
|
'duration': int_or_none(info.get('duration')),
|
||||||
|
'series': info.get('series_title'),
|
||||||
|
'season': info.get('season_title'),
|
||||||
|
'tags': info.get('tags'),
|
||||||
|
'categories': info.get('categories'),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue