[pulsevideo] support age limit

This commit is contained in:
Laura Liberda 2021-02-11 14:34:59 +01:00
parent 4cfa7883a3
commit ac9192619a
2 changed files with 14 additions and 0 deletions

View file

@ -45,6 +45,18 @@ class OnetPlIE(InfoExtractor):
'timestamp': 1607108125,
'upload_date': '20201204',
},
}, {
# age limit
'url': 'https://www.onet.pl/informacje/onetwiadomosci/krwawy-biznes-futerkowcow-film-janusza-schwertnera/82wy9vs,79cfc278',
'info_dict': {
'id': '2188984.870201019',
'ext': 'mp4',
'title': 'Szokujące nagrania. Tak się produkuje futra w Polsce. Film "Krwawy biznes futerkowców" Janusza Schwertnera',
'description': 'Film "Krwawy biznes futerkowców" Janusza Schwertnera',
'timestamp': 1599558803,
'upload_date': '20200908',
'age_limit': 18,
},
}, {
'url': 'http://film.onet.pl/zwiastuny/ghost-in-the-shell-drugi-zwiastun-pl/5q6yl3',
'only_matching': True,

View file

@ -118,6 +118,7 @@ class PulseVideoIE(InfoExtractor):
webpage, default=None) if webpage else None) or meta.get('description')
duration = meta.get('length') or meta.get('lenght')
timestamp = parse_iso8601(meta.get('addDate'), ' ')
age_limit = int_or_none(video['license'].get('rating', '')[len('rating_'):])
return {
'id': video_id,
@ -126,6 +127,7 @@ class PulseVideoIE(InfoExtractor):
'duration': duration,
'timestamp': timestamp,
'formats': formats,
'age_limit': age_limit,
}
def _real_extract(self, url):