X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=youtube-dl;a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fnewstube.py;h=e3f35f1d8b6d526d13bf7b301e57c9570bff3af4;hp=fe29cfc3f0154c0a9a1e9bc039f1633e334a970e;hb=dcdb292fddc82ae11f4c0b647815a45c88a6b6d5;hpb=73c471e9efd3f888af060b391eb750b079a5822c diff --git a/youtube_dl/extractor/newstube.py b/youtube_dl/extractor/newstube.py index fe29cfc3f..e3f35f1d8 100644 --- a/youtube_dl/extractor/newstube.py +++ b/youtube_dl/extractor/newstube.py @@ -1,27 +1,27 @@ -# encoding: utf-8 +# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import ExtractorError +from ..utils import ( + ExtractorError, + int_or_none, +) class NewstubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P.+)' _TEST = { 'url': 'http://www.newstube.ru/media/telekanal-cnn-peremestil-gorod-slavyansk-v-krym', + 'md5': '801eef0c2a9f4089fa04e4fe3533abdc', 'info_dict': { 'id': '728e0ef2-e187-4012-bac0-5a081fdcb1f6', - 'ext': 'flv', + 'ext': 'mp4', 'title': 'Телеканал CNN переместил город Славянск в Крым', 'description': 'md5:419a8c9f03442bc0b0a794d689360335', 'duration': 31.05, }, - 'params': { - # rtmp download - 'skip_download': True, - }, } def _real_extract(self, url): @@ -31,7 +31,7 @@ class NewstubeIE(InfoExtractor): page = self._download_webpage(url, video_id, 'Downloading page') video_guid = self._html_search_regex( - r'