mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-19 09:25:43 +00:00
[ivi] Extract season info
This commit is contained in:
parent
c6270b2ed5
commit
1463c5b9ac
@ -41,6 +41,8 @@ class IviIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Двое из ларца - Дело Гольдберга (1 часть)',
|
'title': 'Двое из ларца - Дело Гольдберга (1 часть)',
|
||||||
'series': 'Двое из ларца',
|
'series': 'Двое из ларца',
|
||||||
|
'season': 'Сезон 1',
|
||||||
|
'season_number': 1,
|
||||||
'episode': 'Дело Гольдберга (1 часть)',
|
'episode': 'Дело Гольдберга (1 часть)',
|
||||||
'episode_number': 1,
|
'episode_number': 1,
|
||||||
'duration': 2655,
|
'duration': 2655,
|
||||||
@ -105,6 +107,13 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
season = self._search_regex(
|
||||||
|
r'<li[^>]+class="season active"[^>]*><a[^>]+>([^<]+)',
|
||||||
|
webpage, 'season', default=None)
|
||||||
|
season_number = int_or_none(self._search_regex(
|
||||||
|
r'<li[^>]+class="season active"[^>]*><a[^>]+data-season(?:-index)?="(\d+)"',
|
||||||
|
webpage, 'season number', default=None))
|
||||||
|
|
||||||
episode_number = int_or_none(self._search_regex(
|
episode_number = int_or_none(self._search_regex(
|
||||||
r'<meta[^>]+itemprop="episode"[^>]*>\s*<meta[^>]+itemprop="episodeNumber"[^>]+content="(\d+)',
|
r'<meta[^>]+itemprop="episode"[^>]*>\s*<meta[^>]+itemprop="episodeNumber"[^>]+content="(\d+)',
|
||||||
webpage, 'episode number', default=None))
|
webpage, 'episode number', default=None))
|
||||||
@ -116,6 +125,8 @@ def _real_extract(self, url):
|
|||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'series': compilation,
|
'series': compilation,
|
||||||
|
'season': season,
|
||||||
|
'season_number': season_number,
|
||||||
'episode': episode,
|
'episode': episode,
|
||||||
'episode_number': episode_number,
|
'episode_number': episode_number,
|
||||||
'thumbnails': thumbnails,
|
'thumbnails': thumbnails,
|
||||||
|
Loading…
Reference in New Issue
Block a user