1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 08:26:50 +00:00

[mediaset] Add support for shortcut

This commit is contained in:
Sergey M․ 2017-05-14 06:28:40 +07:00
parent 946826eec7
commit ca04de463d
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -1,6 +1,8 @@
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
@ -13,11 +15,14 @@ from ..utils import (
class MediasetIE(InfoExtractor):
_VALID_URL = r'''(?x)
(?:
mediaset:|
https?://
(?:www\.)?video\.mediaset\.it/
(?:
(?:video|on-demand)/(?:[^/]+/)+[^/]+_|
player/playerIFrame(?:Twitter)?\.shtml\?.*?\bid=
)
)(?P<id>[0-9]+)
'''
_TESTS = [{
@ -49,6 +54,9 @@ class MediasetIE(InfoExtractor):
# iframe twitter (from http://www.wittytv.it/se-prima-mi-fidavo-zero/)
'url': 'https://www.video.mediaset.it/player/playerIFrameTwitter.shtml?id=665104&playrelated=false&autoplay=false&related=true&hidesocial=true',
'only_matching': True,
}, {
'url': 'mediaset:661824',
'only_matching': True,
}]
def _real_extract(self, url):