mirror of
https://source.netsyms.com/Mirrors/youtube-dl
synced 2024-11-03 03:40:20 +00:00
[animeondemand] Fix typo and improve
This commit is contained in:
parent
85e8f26b82
commit
0d0e282912
@ -100,19 +100,19 @@ class AnimeOnDemandIE(InfoExtractor):
|
|||||||
entries = []
|
entries = []
|
||||||
|
|
||||||
for num, episode_html in enumerate(re.findall(
|
for num, episode_html in enumerate(re.findall(
|
||||||
r'(?s)<h3[^>]+class="episodebox-title".+?>Episodeninhalt<', webpage)):
|
r'(?s)<h3[^>]+class="episodebox-title".+?>Episodeninhalt<', webpage), 1):
|
||||||
episodebox_title = self._search_regex(
|
episodebox_title = self._search_regex(
|
||||||
(r'class="episodebox-title"[^>]+title="(.+?)"',
|
(r'class="episodebox-title"[^>]+title=(["\'])(?P<title>.+?)\1',
|
||||||
r'class="episodebox-title"[^>]+>(.+?)<'),
|
r'class="episodebox-title"[^>]+>(?P<title>.+?)<'),
|
||||||
webpage, 'episodebox title', default=None)
|
episode_html, 'episodebox title', default=None, group='title')
|
||||||
if not episodebox_title:
|
if not episodebox_title:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
episode_number = int(self._search_regex(
|
episode_number = int(self._search_regex(
|
||||||
r'^(?:Episode|Film)\s*(\d+)',
|
r'(?:Episode|Film)\s*(\d+)',
|
||||||
episodebox_title, 'episode number', default=num))
|
episodebox_title, 'episode number', default=num))
|
||||||
episode_title = self._search_regex(
|
episode_title = self._search_regex(
|
||||||
r'(?:Episode|Film)\s*\d+\s*-\s*(?P<title>.+?)',
|
r'(?:Episode|Film)\s*\d+\s*-\s*(.+)',
|
||||||
episodebox_title, 'episode title', default=None)
|
episodebox_title, 'episode title', default=None)
|
||||||
|
|
||||||
video_id = 'episode-%d' % episode_number
|
video_id = 'episode-%d' % episode_number
|
||||||
|
Loading…
Reference in New Issue
Block a user