youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 3217377b3c1e0b0b67f85ce8ec808f6c5cf0c5ae
parent 24da5893fc934207990158f81a90816cdc526c1f
Author: Sergey M․ <dstftw@gmail.com>
Date:   Fri,  6 Jun 2014 21:15:06 +0700

[xvideos] Capture and output inline error if any

Diffstat:
Myoutube_dl/extractor/xvideos.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/youtube_dl/extractor/xvideos.py b/youtube_dl/extractor/xvideos.py @@ -5,6 +5,8 @@ import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, + ExtractorError, + clean_html, ) @@ -28,6 +30,10 @@ class XVideosIE(InfoExtractor): self.report_extraction(video_id) + mobj = re.search(r'<h1 class="inlineError">(.+?)</h1>', webpage) + if mobj: + raise ExtractorError('%s said: %s' % (self.IE_NAME, clean_html(mobj.group(1))), expected=True) + # Extract video URL video_url = compat_urllib_parse.unquote( self._search_regex(r'flv_url=(.+?)&', webpage, 'video URL'))