aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorAbdulelah Alfntokh <iAbdulelah@Gmail.com>2013-10-27 19:48:02 +0300
committerAbdulelah Alfntokh <iAbdulelah@Gmail.com>2013-10-27 19:48:02 +0300
commit198e370f23d9e97b335d1c2603b9fc624817b701 (patch)
treea1be8afa02ad678e7ee0cfc03489d17357bee05f /youtube_dl/extractor
parent3e6a330d38e2bfce12a789c0f51c7d9754f4316e (diff)
[addanime] better regex.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/addanime.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/youtube_dl/extractor/addanime.py b/youtube_dl/extractor/addanime.py
index 490b5af62..465df8cf0 100644
--- a/youtube_dl/extractor/addanime.py
+++ b/youtube_dl/extractor/addanime.py
@@ -8,7 +8,6 @@ from ..utils import (
compat_urllib_parse_urlparse,
ExtractorError,
- RegexNotFoundError,
)
@@ -61,12 +60,8 @@ class AddAnimeIE(InfoExtractor):
note=u'Confirming after redirect')
webpage = self._download_webpage(url, video_id)
- try:
- video_url = self._search_regex(r"var hq_video_file = '(.*?)';",
- webpage, u'video file URL')
- except RegexNotFoundError:
- video_url = self._search_regex(r"var normal_video_file = '(.*?)';",
- webpage, u'video file URL')
+ video_url = self._search_regex(r"var (?:hq|normal)_video_file = '(.*?)';",
+ webpage, u'video file URL')
video_extension = video_url[-3:] # mp4 or flv ?
video_title = self._og_search_title(webpage)