# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( extract_attributes, ) class NZOnScreenIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?nzonscreen\.com/title/(?P[^/]+)' _TEST = { 'url': 'https://www.nzonscreen.com/title/watermark-2001', 'md5': '9d8885fb0d8aeae80a15e7191e54230a', 'info_dict': { 'id': 'watermark-2001', 'ext': 'm4v', 'title': 'Watermark', } } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'

(.+?)

', webpage, 'title') main_clip = self._html_search_regex(r'data-video-config=\'(.+?)\'', webpage, 'source') main_clip = json.loads(main_clip) clips = self._html_search_regex(r'