# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class JkAnimeIE(InfoExtractor): _VALID_URL = r'http://jkanime\.net/(?P[a-zA-Z0-9-_]+)/(?P[a-zA-Z0-9_]+)' IE_DESC = 'JkAnime' _TEST = { 'url': 'http://jkanime.net/dragon-ball-super/1/', 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', 'info_dict': { 'id': '1', 'ext': 'mp4', 'title': 'Video title goes here', } } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'\s*(.*)\s*', webpage, 'title') # for example: 'https://jkanime.net/jk.php?u=stream/jkmedia/5b5b613c768162c54e3bba9ffb07e264/a28e5f284a491ba9f012bd30c66f58ee/1/2b6337dd852fc37524ff5147f21ef36b/', video_url = self._html_search_regex(r'