1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-16 06:15:46 +00:00

Added int_or_none to chapter number

This commit is contained in:
PwnDepot 2021-05-06 17:44:00 -06:00
parent 8f745151ee
commit 206796d6b3

View file

@ -63,7 +63,7 @@ class MasterClassIE(MasterClassBaseIE):
brightcove_url = self.BRIGHTCOVE_URL_TEMPLATE % (self.BRIGHTCOVE_ACCOUNT_ID, brightcove_id)
title = json_data['title']
chapter_number = json_data.get('number')
chapter_number = int_or_none(json_data.get('number'))
duration = int_or_none(parse_duration(json_data.get('duration')))
description = json_data.get('abstract')
thumbnail = url_or_none(json_data.get('video_thumb_url'))
@ -112,7 +112,7 @@ class MasterClassCourseIE(MasterClassBaseIE):
title = json_data['title']
video_id = json_data.get('slug')
chapter_number = json_data.get('number')
chapter_number = int_or_none(json_data.get('number'))
duration = int_or_none(parse_duration(json_data.get('duration')))
description = json_data.get('abstract')
thumbnail = url_or_none(json_data.get('video_thumb_url'))