X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fnewstube.py;h=0092b85ceaa27e9b190a05ea1d4dff299351b6c7;hb=d6712378e73951bede475569c887a1ac73f660a9;hp=119414da02d7ba4e6f8166a1fe2ee0c7f871e64d;hpb=b8b01bb92ad5399e655c0756a74902aefe7bc6a7;p=youtube-dl diff --git a/youtube_dl/extractor/newstube.py b/youtube_dl/extractor/newstube.py index 119414da0..0092b85ce 100644 --- a/youtube_dl/extractor/newstube.py +++ b/youtube_dl/extractor/newstube.py @@ -4,22 +4,23 @@ from __future__ import unicode_literals import re from .common import InfoExtractor +from ..utils import ( + ExtractorError, + int_or_none, +) class NewstubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P.+)' _TEST = { - 'url': 'http://newstube.ru/media/na-korable-progress-prodolzhaetsya-testirovanie-sistemy-kurs', + 'url': 'http://www.newstube.ru/media/telekanal-cnn-peremestil-gorod-slavyansk-v-krym', + 'md5': '801eef0c2a9f4089fa04e4fe3533abdc', 'info_dict': { - 'id': 'd156a237-a6e9-4111-a682-039995f721f1', - 'ext': 'flv', - 'title': 'На корабле «Прогресс» продолжается тестирование системы «Курс»', - 'description': 'md5:d0cbe7b4a6f600552617e48548d5dc77', - 'duration': 20.04, - }, - 'params': { - # rtmp download - 'skip_download': True, + 'id': '728e0ef2-e187-4012-bac0-5a081fdcb1f6', + 'ext': 'mp4', + 'title': 'Телеканал CNN переместил город Славянск в Крым', + 'description': 'md5:419a8c9f03442bc0b0a794d689360335', + 'duration': 31.05, }, } @@ -30,15 +31,19 @@ class NewstubeIE(InfoExtractor): page = self._download_webpage(url, video_id, 'Downloading page') video_guid = self._html_search_regex( - r'