aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/anitube.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-01-23 00:04:33 +0600
committerSergey M․ <dstftw@gmail.com>2016-01-23 00:04:33 +0600
commit10677ece81b7ed05bb84a0dbaf5bd237107eeb62 (patch)
treed3240ade485c6a5847cbd4bcc9262795d939d67d /youtube_dl/extractor/anitube.py
parentd570746e45cff3c0f89654bf748e44a5da75a924 (diff)
downloadyoutube-dl-10677ece81b7ed05bb84a0dbaf5bd237107eeb62.tar.xz
[nuevo] Simplify nuevo extractors (Closes #7728)
Diffstat (limited to 'youtube_dl/extractor/anitube.py')
-rw-r--r--youtube_dl/extractor/anitube.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/youtube_dl/extractor/anitube.py b/youtube_dl/extractor/anitube.py
index 73690df82..2fd912da4 100644
--- a/youtube_dl/extractor/anitube.py
+++ b/youtube_dl/extractor/anitube.py
@@ -1,7 +1,5 @@
from __future__ import unicode_literals
-import re
-
from .nuevo import NuevoBaseIE
@@ -22,12 +20,11 @@ class AnitubeIE(NuevoBaseIE):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
key = self._search_regex(
r'src=["\']https?://[^/]+/embed/([A-Za-z0-9_-]+)', webpage, 'key')
- config_url = 'http://www.anitube.se/nuevo/econfig.php?key=%s' % key
- return self._extract_nuevo(config_url, video_id)
+ return self._extract_nuevo(
+ 'http://www.anitube.se/nuevo/econfig.php?key=%s' % key, video_id)