diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-03-18 00:12:34 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-03-18 00:13:50 +0600 |
commit | 0d0e282912a7ade43a148518c742557c310a41a3 (patch) | |
tree | 4b826bced8f95571fc0071f0d4a685fabfad0b2b /youtube_dl | |
parent | 85e8f26b827e77cbed6a83268787d450ab2bea3b (diff) |
[animeondemand] Fix typo and improve
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/animeondemand.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/extractor/animeondemand.py b/youtube_dl/extractor/animeondemand.py index 3631c2451..0158407f6 100644 --- a/youtube_dl/extractor/animeondemand.py +++ b/youtube_dl/extractor/animeondemand.py @@ -100,19 +100,19 @@ class AnimeOnDemandIE(InfoExtractor): entries = [] 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( - (r'class="episodebox-title"[^>]+title="(.+?)"', - r'class="episodebox-title"[^>]+>(.+?)<'), - webpage, 'episodebox title', default=None) + (r'class="episodebox-title"[^>]+title=(["\'])(?P<title>.+?)\1', + r'class="episodebox-title"[^>]+>(?P<title>.+?)<'), + episode_html, 'episodebox title', default=None, group='title') if not episodebox_title: continue episode_number = int(self._search_regex( - r'^(?:Episode|Film)\s*(\d+)', + r'(?:Episode|Film)\s*(\d+)', episodebox_title, 'episode number', default=num)) 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) video_id = 'episode-%d' % episode_number |