aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-05-14 06:28:40 +0700
committerSergey M․ <dstftw@gmail.com>2017-05-14 06:28:40 +0700
commitca04de463d17cc8bf53dafb19eb25e6dff8bd239 (patch)
tree8616467294bc8be2ab217f46af02ae4a73d9a6e3 /youtube_dl/extractor
parent946826eec75aeb2fe0e9edc8e734b6bfd89ad7c4 (diff)
[mediaset] Add support for shortcut
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/mediaset.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/youtube_dl/extractor/mediaset.py b/youtube_dl/extractor/mediaset.py
index 89e23ca9b..3ebc7f2e1 100644
--- a/youtube_dl/extractor/mediaset.py
+++ b/youtube_dl/extractor/mediaset.py
@@ -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,12 +15,15 @@ from ..utils import (
class MediasetIE(InfoExtractor):
_VALID_URL = r'''(?x)
- https?://
- (?:www\.)?video\.mediaset\.it/
- (?:
- (?:video|on-demand)/(?:[^/]+/)+[^/]+_|
- player/playerIFrame(?:Twitter)?\.shtml\?.*?\bid=
- )(?P<id>[0-9]+)
+ (?:
+ mediaset:|
+ https?://
+ (?:www\.)?video\.mediaset\.it/
+ (?:
+ (?:video|on-demand)/(?:[^/]+/)+[^/]+_|
+ player/playerIFrame(?:Twitter)?\.shtml\?.*?\bid=
+ )
+ )(?P<id>[0-9]+)
'''
_TESTS = [{
# full episode
@@ -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):