X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fvice.py;h=01af7a99574401b38e487b01dd5104e674740bbc;hb=40101dc311909523852a88ba69df76be9b6bc920;hp=dfb621468d333a438179b56ca04c2cd2e2e74209;hpb=7a4a945f138078b95f02e8cec1e38123d66d7f09;p=youtube-dl diff --git a/youtube_dl/extractor/vice.py b/youtube_dl/extractor/vice.py index dfb621468..01af7a995 100644 --- a/youtube_dl/extractor/vice.py +++ b/youtube_dl/extractor/vice.py @@ -1,5 +1,4 @@ from __future__ import unicode_literals -import re from .common import InfoExtractor from .ooyala import OoyalaIE @@ -7,7 +6,7 @@ from ..utils import ExtractorError class ViceIE(InfoExtractor): - _VALID_URL = r'https?://(.+?\.)?vice\.com/.*?/(?P.+)' + _VALID_URL = r'https?://(?:.+?\.)?vice\.com/(?:[^/]+/)+(?P.+)' _TESTS = [ { @@ -23,23 +22,13 @@ class ViceIE(InfoExtractor): }, }, { 'url': 'https://news.vice.com/video/experimenting-on-animals-inside-the-monkey-lab', - 'info_dict': { - 'id': 'N2bzkydjraWDGwnt8jAttCF6Y0PDv4Zj', - 'ext': 'mp4', - 'title': 'VICE News - Inside the Monkey Lab', - 'description': 'md5:1f660d467d3515f29d11e5ef742a4b82', - }, - 'params': { - # Requires ffmpeg (m3u8 manifest) - 'skip_download': True, - }, + 'only_matching': True, } ] def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - name = mobj.group('name') - webpage = self._download_webpage(url, name) + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) try: embed_code = self._search_regex( r'embedCode=([^&\'"]+)', webpage,