X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fxtube.py;h=e3458d2bd4abaa196190f886afce2e9ac05df191;hb=3f8ced5144a76a3f9ab7ee8cd06cc79bb75dc564;hp=7d06a7021181538f0feb8fe0c97a3dc2614b3caf;hpb=dcc2a706ef7df65839aa40ce5fda61f8cea36645;p=youtube-dl diff --git a/youtube_dl/extractor/xtube.py b/youtube_dl/extractor/xtube.py index 7d06a7021..e3458d2bd 100644 --- a/youtube_dl/extractor/xtube.py +++ b/youtube_dl/extractor/xtube.py @@ -5,7 +5,6 @@ from .common import InfoExtractor from ..utils import ( compat_urllib_parse_urlparse, compat_urllib_request, - compat_urllib_parse, ) class XTubeIE(InfoExtractor): @@ -16,6 +15,7 @@ class XTubeIE(InfoExtractor): u'md5': u'092fbdd3cbe292c920ef6fc6a8a9cdab', u'info_dict': { u"title": u"strange erotica", + u"description": u"surreal gay themed erotica...almost an ET kind of thing", u"uploader": u"greenshowers", u"age_limit": 18, } @@ -34,12 +34,12 @@ class XTubeIE(InfoExtractor): video_uploader = self._html_search_regex(r'so_s\.addVariable\("owner_u", "([^"]+)', webpage, u'uploader', fatal=False) video_description = self._html_search_regex(r'

([^<]+)', webpage, u'description', default=None) video_url= self._html_search_regex(r'var videoMp4 = "([^"]+)', webpage, u'video_url').replace('\\/', '/') - path = compat_urllib_parse_urlparse( video_url ).path - extension = os.path.splitext( path )[1][1:] + path = compat_urllib_parse_urlparse(video_url).path + extension = os.path.splitext(path)[1][1:] format = path.split('/')[5].split('_')[:2] format[0] += 'p' format[1] += 'k' - format = "-".join( format ) + format = "-".join(format) return { 'id': video_id,