mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
Fix/improve timestamp, categories, tags
This commit is contained in:
parent
3abae00087
commit
80d03d7e69
@ -55,8 +55,8 @@ class SBSIE(InfoExtractor):
|
||||
'timestamp': 1408613220,
|
||||
'upload_date': '20140821',
|
||||
'uploader': 'SBSC',
|
||||
'tags': None,
|
||||
'categories': None,
|
||||
'tags': 'mincount:10',
|
||||
'categories': 'count:2',
|
||||
},
|
||||
'expected_warnings': ['Unable to download JSON metadata'],
|
||||
}, {
|
||||
@ -198,17 +198,22 @@ class SBSIE(InfoExtractor):
|
||||
'season_number': (('partOfSeries', None), 'seasonNumber', T(int_or_none)),
|
||||
'episode': ('epName', T(str)),
|
||||
'episode_number': ('episodeNumber', T(int_or_none)),
|
||||
'timestamp': ('datePublished', ('publication', 'startDate'), T(parse_iso8601)),
|
||||
'timestamp': (('datePublished', ('publication', 'startDate')), T(parse_iso8601)),
|
||||
'release_year': ('releaseYear', T(int_or_none)),
|
||||
'duration': ('duration', T(really_parse_duration)),
|
||||
'is_live': ('liveStream', T(bool)),
|
||||
'age_limit': ('classificationID', 'contentRating',
|
||||
T(lambda x: self.AUS_TV_PARENTAL_GUIDELINES.get(x, '').upper() or None)), # dict.get is unhashable in py3.7
|
||||
}, get_all=False), traverse_obj(media, {
|
||||
'categories': (('genres', Ellipsis), ('taxonomy', ('genre', 'subgenre'),
|
||||
'name', T(str))),
|
||||
'tags': (('consumerAdviceTexts', ('sbsSubCertification', 'consumerAdvice')),
|
||||
Ellipsis, T(str)),
|
||||
'categories': ((('genres', Ellipsis),
|
||||
('taxonomy', ((('genre', 'subgenre'), Ellipsis, 'name'), 'useType'))),
|
||||
T(str)),
|
||||
'tags': ((((('keywords',),
|
||||
('consumerAdviceTexts', ('sbsSubCertification', 'consumerAdvice'))),
|
||||
Ellipsis),
|
||||
('taxonomy', ('era', 'location', 'section', 'subject', 'theme'),
|
||||
Ellipsis, 'name')),
|
||||
T(str)),
|
||||
'thumbnails': ('thumbnails', lambda _, v: v['contentUrl'], T(mk_thumb)),
|
||||
}), {
|
||||
'formats': formats,
|
||||
|
Loading…
Reference in New Issue
Block a user