mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 00:22:34 +01:00
parent
ccfd70f4c2
commit
cc07f5cc85
@ -211,7 +211,8 @@ class AbemaTVIE(AbemaTVBaseIE):
|
|||||||
'id': '194-25_s2_p1',
|
'id': '194-25_s2_p1',
|
||||||
'title': '第1話 「チーズケーキ」 「モーニング再び」',
|
'title': '第1話 「チーズケーキ」 「モーニング再び」',
|
||||||
'series': '異世界食堂2',
|
'series': '異世界食堂2',
|
||||||
'series_number': 2,
|
'season': 'シーズン2',
|
||||||
|
'season_number': 2,
|
||||||
'episode': '第1話 「チーズケーキ」 「モーニング再び」',
|
'episode': '第1話 「チーズケーキ」 「モーニング再び」',
|
||||||
'episode_number': 1,
|
'episode_number': 1,
|
||||||
},
|
},
|
||||||
@ -347,12 +348,12 @@ def _real_extract(self, url):
|
|||||||
)?
|
)?
|
||||||
''', r'\1', og_desc)
|
''', r'\1', og_desc)
|
||||||
|
|
||||||
# canonical URL may contain series and episode number
|
# canonical URL may contain season and episode number
|
||||||
mobj = re.search(r's(\d+)_p(\d+)$', canonical_url)
|
mobj = re.search(r's(\d+)_p(\d+)$', canonical_url)
|
||||||
if mobj:
|
if mobj:
|
||||||
seri = int_or_none(mobj.group(1), default=float('inf'))
|
seri = int_or_none(mobj.group(1), default=float('inf'))
|
||||||
epis = int_or_none(mobj.group(2), default=float('inf'))
|
epis = int_or_none(mobj.group(2), default=float('inf'))
|
||||||
info['series_number'] = seri if seri < 100 else None
|
info['season_number'] = seri if seri < 100 else None
|
||||||
# some anime like Detective Conan (though not available in AbemaTV)
|
# some anime like Detective Conan (though not available in AbemaTV)
|
||||||
# has more than 1000 episodes (1026 as of 2021/11/15)
|
# has more than 1000 episodes (1026 as of 2021/11/15)
|
||||||
info['episode_number'] = epis if epis < 2000 else None
|
info['episode_number'] = epis if epis < 2000 else None
|
||||||
@ -381,7 +382,7 @@ def _real_extract(self, url):
|
|||||||
self.report_warning('This is a premium-only stream')
|
self.report_warning('This is a premium-only stream')
|
||||||
info.update(traverse_obj(api_response, {
|
info.update(traverse_obj(api_response, {
|
||||||
'series': ('series', 'title'),
|
'series': ('series', 'title'),
|
||||||
'season': ('season', 'title'),
|
'season': ('season', 'name'),
|
||||||
'season_number': ('season', 'sequence'),
|
'season_number': ('season', 'sequence'),
|
||||||
'episode_number': ('episode', 'number'),
|
'episode_number': ('episode', 'number'),
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user