# coding: utf-8
from __future__ import unicode_literals
-import re
from .common import InfoExtractor
from ..utils import (
}]
def _real_extract(self, url):
- match = re.match(self._VALID_URL, url).groupdict()
+ match = self._match_valid_url(url).groupdict()
video_id, display_id = match.get('id'), match.get('display_id')
data = self._call_api('https://api.vidio.com/videos/' + video_id, display_id)
video = data['videos'][0]
def _real_extract(self, url):
url, idata = unsmuggle_url(url, {})
- playlist_id, display_id = re.match(self._VALID_URL, url).groups()
+ playlist_id, display_id = self._match_valid_url(url).groups()
playlist_url = idata.get('url')
if playlist_url: # Smuggled data contains an API URL. Download only that playlist
}]
def _real_extract(self, url):
- video_id, display_id = re.match(self._VALID_URL, url).groups()
+ video_id, display_id = self._match_valid_url(url).groups()
stream_data = self._call_api(
'https://www.vidio.com/api/livestreamings/%s/detail' % video_id, display_id)
stream_meta = stream_data['livestreamings'][0]
formats = []
if stream_meta.get('is_drm'):
if not self.get_param('allow_unplayable_formats'):
- self.raise_no_formats(
- 'This video is DRM protected.', expected=True)
+ self.report_drm(video_id)
if stream_meta.get('is_premium'):
sources = self._download_json(
'https://www.vidio.com/interactions_stream.json?video_id=%s&type=livestreamings' % video_id,