-from __future__ import unicode_literals
-
-import re
-
from .common import InfoExtractor
from ..utils import (
float_or_none,
class ViddlerIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?viddler\.com/(?:v|embed|player)/(?P<id>[a-z0-9]+)(?:.+?\bsecret=(\d+))?'
+ _EMBED_REGEX = [r'<(?:iframe[^>]+?src|param[^>]+?value)=(["\'])(?P<url>(?:https?:)?//(?:www\.)?viddler\.com/(?:embed|player)/.+?)\1']
+
_TESTS = [{
'url': 'http://www.viddler.com/v/43903784',
'md5': '9eee21161d2c7f5b39690c3e325fab2f',
}]
def _real_extract(self, url):
- video_id, secret = re.match(self._VALID_URL, url).groups()
+ video_id, secret = self._match_valid_url(url).groups()
query = {
'video_id': video_id,
f['format_id'] = format_id + '-html5'
f['source_preference'] = 0
formats.append(f)
- self._sort_formats(formats)
categories = [
t.get('text') for t in data.get('tags', []) if 'text' in t]