]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/anitube.py
Fix the changelog.
[youtubedl] / youtube_dl / extractor / anitube.py
1 from __future__ import unicode_literals
2
3 from .nuevo import NuevoBaseIE
4
5
6 class AnitubeIE(NuevoBaseIE):
7 IE_NAME = 'anitube.se'
8 _VALID_URL = r'https?://(?:www\.)?anitube\.se/video/(?P<id>\d+)'
9
10 _TEST = {
11 'url': 'http://www.anitube.se/video/36621',
12 'md5': '59d0eeae28ea0bc8c05e7af429998d43',
13 'info_dict': {
14 'id': '36621',
15 'ext': 'mp4',
16 'title': 'Recorder to Randoseru 01',
17 'duration': 180.19,
18 },
19 'skip': 'Blocked in the US',
20 }
21
22 def _real_extract(self, url):
23 video_id = self._match_id(url)
24
25 webpage = self._download_webpage(url, video_id)
26 key = self._search_regex(
27 r'src=["\']https?://[^/]+/embed/([A-Za-z0-9_-]+)', webpage, 'key')
28
29 return self._extract_nuevo(
30 'http://www.anitube.se/nuevo/econfig.php?key=%s' % key, video_id)