]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/hotstar.py
[cleanup] Fix infodict returned fields (#8906)
[yt-dlp.git] / yt_dlp / extractor / hotstar.py
index 541792b908ae6ffc34669126199f524ed0b0f84c..a3a3c20c9fd0ef46560f1f3a6945d50d99f6707e 100644 (file)
@@ -115,11 +115,11 @@ class HotStarIE(HotStarBaseIE):
             'upload_date': '20190501',
             'duration': 1219,
             'channel': 'StarPlus',
-            'channel_id': 3,
+            'channel_id': '3',
             'series': 'Ek Bhram - Sarvagun Sampanna',
             'season': 'Chapter 1',
             'season_number': 1,
-            'season_id': 6771,
+            'season_id': '6771',
             'episode': 'Janhvi Targets Suman',
             'episode_number': 8,
         }
@@ -135,12 +135,12 @@ class HotStarIE(HotStarBaseIE):
             'channel': 'StarPlus',
             'series': 'Anupama',
             'season_number': 1,
-            'season_id': 7399,
+            'season_id': '7399',
             'upload_date': '20230307',
             'episode': 'Anupama, Anuj Share a Moment',
             'episode_number': 853,
             'duration': 1272,
-            'channel_id': 3,
+            'channel_id': '3',
         },
         'skip': 'HTTP Error 504: Gateway Time-out',  # XXX: Investigate 504 errors on some episodes
     }, {
@@ -155,12 +155,12 @@ class HotStarIE(HotStarBaseIE):
             'channel': 'Hotstar Specials',
             'series': 'Kana Kaanum Kaalangal',
             'season_number': 1,
-            'season_id': 9441,
+            'season_id': '9441',
             'upload_date': '20220421',
             'episode': 'Back To School',
             'episode_number': 1,
             'duration': 1810,
-            'channel_id': 54,
+            'channel_id': '54',
         },
     }, {
         'url': 'https://www.hotstar.com/in/clips/e3-sairat-kahani-pyaar-ki/1000262286',
@@ -325,11 +325,11 @@ def _real_extract(self, url):
             'formats': formats,
             'subtitles': subs,
             'channel': video_data.get('channelName'),
-            'channel_id': video_data.get('channelId'),
+            'channel_id': str_or_none(video_data.get('channelId')),
             'series': video_data.get('showName'),
             'season': video_data.get('seasonName'),
             'season_number': int_or_none(video_data.get('seasonNo')),
-            'season_id': video_data.get('seasonId'),
+            'season_id': str_or_none(video_data.get('seasonId')),
             'episode': video_data.get('title'),
             'episode_number': int_or_none(video_data.get('episodeNo')),
         }