mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-23 10:37:18 -05:00
[mediaset] Add support for shortcut
This commit is contained in:
parent
946826eec7
commit
ca04de463d
@ -1,6 +1,8 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_str
|
from ..compat import compat_str
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
@ -13,12 +15,15 @@ from ..utils import (
|
|||||||
|
|
||||||
class MediasetIE(InfoExtractor):
|
class MediasetIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
(?:
|
||||||
(?:www\.)?video\.mediaset\.it/
|
mediaset:|
|
||||||
(?:
|
https?://
|
||||||
(?:video|on-demand)/(?:[^/]+/)+[^/]+_|
|
(?:www\.)?video\.mediaset\.it/
|
||||||
player/playerIFrame(?:Twitter)?\.shtml\?.*?\bid=
|
(?:
|
||||||
)(?P<id>[0-9]+)
|
(?:video|on-demand)/(?:[^/]+/)+[^/]+_|
|
||||||
|
player/playerIFrame(?:Twitter)?\.shtml\?.*?\bid=
|
||||||
|
)
|
||||||
|
)(?P<id>[0-9]+)
|
||||||
'''
|
'''
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
# full episode
|
# full episode
|
||||||
@ -49,6 +54,9 @@ class MediasetIE(InfoExtractor):
|
|||||||
# iframe twitter (from http://www.wittytv.it/se-prima-mi-fidavo-zero/)
|
# 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',
|
'url': 'https://www.video.mediaset.it/player/playerIFrameTwitter.shtml?id=665104&playrelated=false&autoplay=false&related=true&hidesocial=true',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'mediaset:661824',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user