X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsmotri.py;h=99f5b19d2dd68e78aaf2f45f79fad60b8bb459dc;hb=9d11a41fe4f1f70682640e8522565827047dbf89;hp=f86ee8388c3bce34d7b92931dbbe185a0d7673df;hpb=55f6597c67dd04729dbc1b83d81bfbd63d7e9c0a;p=youtube-dl diff --git a/youtube_dl/extractor/smotri.py b/youtube_dl/extractor/smotri.py index f86ee8388..99f5b19d2 100644 --- a/youtube_dl/extractor/smotri.py +++ b/youtube_dl/extractor/smotri.py @@ -1,5 +1,6 @@ # encoding: utf-8 +import os.path import re import json import hashlib @@ -9,7 +10,8 @@ from .common import InfoExtractor from ..utils import ( compat_urllib_parse, compat_urllib_request, - ExtractorError + ExtractorError, + url_basename, ) @@ -132,7 +134,16 @@ class SmotriIE(InfoExtractor): # We will extract some from the video web page instead video_page_url = 'http://' + mobj.group('url') video_page = self._download_webpage(video_page_url, video_id, u'Downloading video page') - + + # Warning if video is unavailable + warning = self._html_search_regex( + r'