mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[extractor/hotstar] Support /shows/
URLs (#7225)
Closes #6463 Authored by: bashonly
This commit is contained in:
parent
7bc9251746
commit
7f8ddebbb5
1 changed files with 36 additions and 4 deletions
|
@ -83,7 +83,7 @@ class HotStarIE(HotStarBaseIE):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://(?:www\.)?hotstar\.com(?:/in)?/(?!in/)
|
https?://(?:www\.)?hotstar\.com(?:/in)?/(?!in/)
|
||||||
(?:
|
(?:
|
||||||
(?P<type>movies|sports|episode|(?P<tv>tv))/
|
(?P<type>movies|sports|episode|(?P<tv>tv|shows))/
|
||||||
(?(tv)(?:[^/?#]+/){2}|[^?#]*)
|
(?(tv)(?:[^/?#]+/){2}|[^?#]*)
|
||||||
)?
|
)?
|
||||||
[^/?#]+/
|
[^/?#]+/
|
||||||
|
@ -122,6 +122,25 @@ class HotStarIE(HotStarBaseIE):
|
||||||
'episode': 'Janhvi Targets Suman',
|
'episode': 'Janhvi Targets Suman',
|
||||||
'episode_number': 8,
|
'episode_number': 8,
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '1000282843',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Anupama, Anuj Share a Moment',
|
||||||
|
'season': 'Chapter 1',
|
||||||
|
'description': 'md5:8d74ed2248423b8b06d5c8add4d7a0c0',
|
||||||
|
'timestamp': 1678149000,
|
||||||
|
'channel': 'StarPlus',
|
||||||
|
'series': 'Anupama',
|
||||||
|
'season_number': 1,
|
||||||
|
'season_id': 7399,
|
||||||
|
'upload_date': '20230307',
|
||||||
|
'episode': 'Anupama, Anuj Share a Moment',
|
||||||
|
'episode_number': 853,
|
||||||
|
'duration': 1272,
|
||||||
|
'channel_id': 3,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.hotstar.com/movies/radha-gopalam/1000057157',
|
'url': 'https://www.hotstar.com/movies/radha-gopalam/1000057157',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -139,6 +158,7 @@ class HotStarIE(HotStarBaseIE):
|
||||||
'sports': 'match',
|
'sports': 'match',
|
||||||
'episode': 'episode',
|
'episode': 'episode',
|
||||||
'tv': 'episode',
|
'tv': 'episode',
|
||||||
|
'shows': 'episode',
|
||||||
None: 'content',
|
None: 'content',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,13 +324,16 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
class HotStarPlaylistIE(HotStarBaseIE):
|
class HotStarPlaylistIE(HotStarBaseIE):
|
||||||
IE_NAME = 'hotstar:playlist'
|
IE_NAME = 'hotstar:playlist'
|
||||||
_VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/tv(?:/[^/]+){2}/list/[^/]+/t-(?P<id>\w+)'
|
_VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)(?:/[^/]+){2}/list/[^/]+/t-(?P<id>\w+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/popular-clips/t-3_2_26',
|
'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/popular-clips/t-3_2_26',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '3_2_26',
|
'id': '3_2_26',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 20,
|
'playlist_mincount': 20,
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.hotstar.com/shows/savdhaan-india/s-26/list/popular-clips/t-3_2_26',
|
||||||
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/extras/t-2480',
|
'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/extras/t-2480',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -327,7 +350,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
class HotStarSeasonIE(HotStarBaseIE):
|
class HotStarSeasonIE(HotStarBaseIE):
|
||||||
IE_NAME = 'hotstar:season'
|
IE_NAME = 'hotstar:season'
|
||||||
_VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)'
|
_VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.hotstar.com/tv/radhakrishn/1260000646/seasons/season-2/ss-8028',
|
'url': 'https://www.hotstar.com/tv/radhakrishn/1260000646/seasons/season-2/ss-8028',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
@ -346,6 +369,9 @@ class HotStarSeasonIE(HotStarBaseIE):
|
||||||
'id': '8208',
|
'id': '8208',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 19,
|
'playlist_mincount': 19,
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.hotstar.com/in/shows/bigg-boss/14714/seasons/season-4/ss-8208/',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
@ -356,7 +382,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
class HotStarSeriesIE(HotStarBaseIE):
|
class HotStarSeriesIE(HotStarBaseIE):
|
||||||
IE_NAME = 'hotstar:series'
|
IE_NAME = 'hotstar:series'
|
||||||
_VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))/?(?:[#?]|$)'
|
_VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)/[^/]+/(?P<id>\d+))/?(?:[#?]|$)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.hotstar.com/in/tv/radhakrishn/1260000646',
|
'url': 'https://www.hotstar.com/in/tv/radhakrishn/1260000646',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
@ -375,6 +401,12 @@ class HotStarSeriesIE(HotStarBaseIE):
|
||||||
'id': '435',
|
'id': '435',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 267,
|
'playlist_mincount': 267,
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.hotstar.com/in/shows/anupama/1260022017/',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '1260022017',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 940,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
Loading…
Reference in a new issue