From 206796d6b37d0af9e8e3699a30d3b1301b7e2c06 Mon Sep 17 00:00:00 2001 From: PwnDepot Date: Thu, 6 May 2021 17:44:00 -0600 Subject: [PATCH] Added int_or_none to chapter number --- youtube_dl/extractor/masterclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/masterclass.py b/youtube_dl/extractor/masterclass.py index 2e9f9b8c6..8ab0d56c8 100644 --- a/youtube_dl/extractor/masterclass.py +++ b/youtube_dl/extractor/masterclass.py @@ -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'))