+
+
+class HotStarPlaylistIE(HotStarBaseIE):
+ IE_NAME = 'hotstar:playlist'
+ _VALID_URL = r'https?://(?:www\.)?hotstar\.com/tv/[^/]+/s-\w+/list/[^/]+/t-(?P<id>\w+)'
+ _TESTS = [{
+ 'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/popular-clips/t-3_2_26',
+ 'info_dict': {
+ 'id': '3_2_26',
+ },
+ 'playlist_mincount': 20,
+ }, {
+ 'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/extras/t-2480',
+ 'only_matching': True,
+ }]
+
+ def _real_extract(self, url):
+ playlist_id = self._match_id(url)
+
+ collection = self._call_api('o/v1/tray/find', playlist_id, 'uqId')
+
+ entries = [
+ self.url_result(
+ 'https://www.hotstar.com/%s' % video['contentId'],
+ ie=HotStarIE.ie_key(), video_id=video['contentId'])
+ for video in collection['assets']['items']
+ if video.get('contentId')]
+
+ return self.playlist_result(entries, playlist_id)