from __future__ import unicode_literals import re from .common import InfoExtractor class SoulAnimeWatchingIE(InfoExtractor): IE_NAME = "soulanime:watching" IE_DESC = "SoulAnime video" _TEST = { 'url': 'http://www.soul-anime.net/watching/seirei-tsukai-no-blade-dance-episode-9/', 'md5': '05fae04abf72298098b528e98abf4298', 'info_dict': { 'id': 'seirei-tsukai-no-blade-dance-episode-9', 'ext': 'mp4', 'title': 'seirei-tsukai-no-blade-dance-episode-9', 'description': 'seirei-tsukai-no-blade-dance-episode-9' } } _VALID_URL = r'http://[w.]*soul-anime\.(?P[^/]+)/watch[^/]*/(?P[^/]+)' def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') domain = mobj.group('domain') page = self._download_webpage(url, video_id) video_url_encoded = self._html_search_regex( r'