yt-dlp/youtube_dl/extractor/viddler.py

139 lines
4.8 KiB
Python
Raw Normal View History

2014-10-24 16:10:11 -06:00
from __future__ import unicode_literals
2019-03-11 08:53:44 -06:00
import re
from .common import InfoExtractor
2014-10-24 16:10:11 -06:00
from ..utils import (
float_or_none,
int_or_none,
)
class ViddlerIE(InfoExtractor):
2019-03-11 08:53:44 -06:00
_VALID_URL = r'https?://(?:www\.)?viddler\.com/(?:v|embed|player)/(?P<id>[a-z0-9]+)(?:.+?\bsecret=(\d+))?'
_TESTS = [{
2015-01-28 09:49:42 -07:00
'url': 'http://www.viddler.com/v/43903784',
2016-02-09 12:12:47 -07:00
'md5': '9eee21161d2c7f5b39690c3e325fab2f',
2014-10-24 16:10:11 -06:00
'info_dict': {
'id': '43903784',
2016-02-09 12:12:47 -07:00
'ext': 'mov',
2015-01-28 09:49:42 -07:00
'title': 'Video Made Easy',
'description': 'md5:6a697ebd844ff3093bd2e82c37b409cd',
'uploader': 'viddler',
2014-10-24 16:10:11 -06:00
'timestamp': 1335371429,
'upload_date': '20120425',
2015-01-28 09:49:42 -07:00
'duration': 100.89,
'thumbnail': r're:^https?://.*\.jpg$',
2014-10-24 16:10:11 -06:00