# coding: utf-8 from __future__ import unicode_literals import os from .common import InfoExtractor from ..utils import ExtractorError class NinjaStreamIE(InfoExtractor): """ Handles downloading video from ninjastream.to """ _VALID_URL = r'https?://(?:www\.)?ninjastream\.to/(?:download|watch)/(?P[^/?#]+)' _TESTS = [ { 'url': 'https://ninjastream.to/watch/GbJQP8rawQ7rw', 'info_dict': { 'id': 'GbJQP8rawQ7rw', 'ext': 'mp4', 'title': 'Big Buck Bunny 360 10s 5MB' }, } ] def _real_extract(self, url): video_id = self._match_id(url) # Get the hosted webpage webpage = self._download_webpage(url, video_id) # The links to the m3u8 file will be buried and html encoded in # the tag jwplayer_link = self._html_search_regex( r'