mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 19:52:11 +00:00
[vbox7] Add support for embed URLs
This commit is contained in:
parent
502d87c546
commit
9c0fa60bf3
1 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,7 @@ from ..utils import urlencode_postdata
|
||||||
|
|
||||||
|
|
||||||
class Vbox7IE(InfoExtractor):
|
class Vbox7IE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?vbox7\.com/play:(?P<id>[^/]+)'
|
_VALID_URL = r'https?://(?:www\.)?vbox7\.com/(?:play:|emb/external\.php\?.*?\bvid=)(?P<id>[\da-fA-F]+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://vbox7.com/play:0946fff23c',
|
'url': 'http://vbox7.com/play:0946fff23c',
|
||||||
'md5': 'a60f9ab3a3a2f013ef9a967d5f7be5bf',
|
'md5': 'a60f9ab3a3a2f013ef9a967d5f7be5bf',
|
||||||
|
@ -24,15 +24,19 @@ class Vbox7IE(InfoExtractor):
|
||||||
'title': 'Смях! Чудо - чист за секунди - Скрита камера',
|
'title': 'Смях! Чудо - чист за секунди - Скрита камера',
|
||||||
},
|
},
|
||||||
'skip': 'georestricted',
|
'skip': 'georestricted',
|
||||||
|
}, {
|
||||||
|
'url': 'http://vbox7.com/emb/external.php?vid=a240d20f9c&autoplay=1',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(
|
||||||
|
'http://vbox7.com/play:%s' % video_id, video_id)
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<title>(.*)</title>', webpage, 'title').split('/')[0].strip()
|
r'<title>(.+?)</title>', webpage, 'title').split('/')[0].strip()
|
||||||
|
|
||||||
video_url = self._search_regex(
|
video_url = self._search_regex(
|
||||||
r'src\s*:\s*(["\'])(?P<url>.+?.mp4.*?)\1',
|
r'src\s*:\s*(["\'])(?P<url>.+?.mp4.*?)\1',
|
||||||
|
|
Loading…
Reference in a new issue