diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-15 21:28:36 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-15 21:28:36 +0600 |
commit | b3f502cdb971c8cc827d8646d8dcb659caa77149 (patch) | |
tree | 7d7e0b807f73022ac5ef873413637da5713681b0 /youtube_dl/extractor/xtube.py | |
parent | 587dfd44a4df3fac573e1152ca70f34eabe42611 (diff) |
[xtube] Add shortcut
Diffstat (limited to 'youtube_dl/extractor/xtube.py')
-rw-r--r-- | youtube_dl/extractor/xtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/xtube.py b/youtube_dl/extractor/xtube.py index a1fe24050..2254cd238 100644 --- a/youtube_dl/extractor/xtube.py +++ b/youtube_dl/extractor/xtube.py @@ -12,7 +12,7 @@ from ..utils import ( class XTubeIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?(?P<url>xtube\.com/watch\.php\?v=(?P<id>[^/?&#]+))' + _VALID_URL = r'(?:xtube:|https?://(?:www\.)?xtube\.com/watch\.php\?.*\bv=)(?P<id>[^/?&#]+)' _TEST = { 'url': 'http://www.xtube.com/watch.php?v=kVTUy_G222_', 'md5': '092fbdd3cbe292c920ef6fc6a8a9cdab', @@ -30,7 +30,7 @@ class XTubeIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) - req = sanitized_Request(url) + req = sanitized_Request('http://www.xtube.com/watch.php?v=%s' % video_id) req.add_header('Cookie', 'age_verified=1') webpage = self._download_webpage(req, video_id) |