Compare commits
3 Commits
2013.12.23
...
2013.12.23
Author | SHA1 | Date | |
---|---|---|---|
|
504c668d3b | ||
|
466617f539 | ||
|
196938835a |
@@ -192,7 +192,6 @@ class YoutubeDL(object):
|
|||||||
['bidiv'] + width_args, **sp_kwargs
|
['bidiv'] + width_args, **sp_kwargs
|
||||||
)
|
)
|
||||||
except OSError:
|
except OSError:
|
||||||
print('Falling back to fribidi')
|
|
||||||
self._output_process = subprocess.Popen(
|
self._output_process = subprocess.Popen(
|
||||||
['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs)
|
['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs)
|
||||||
self._output_channel = os.fdopen(master, 'rb')
|
self._output_channel = os.fdopen(master, 'rb')
|
||||||
@@ -251,7 +250,6 @@ class YoutubeDL(object):
|
|||||||
|
|
||||||
def _bidi_workaround(self, message):
|
def _bidi_workaround(self, message):
|
||||||
if not hasattr(self, '_output_channel'):
|
if not hasattr(self, '_output_channel'):
|
||||||
print('WORKAROUND NOT ENABLED')
|
|
||||||
return message
|
return message
|
||||||
|
|
||||||
assert hasattr(self, '_output_process')
|
assert hasattr(self, '_output_process')
|
||||||
|
@@ -70,13 +70,14 @@ class BlipTVIE(InfoExtractor):
|
|||||||
info = None
|
info = None
|
||||||
urlh = self._request_webpage(request, None, False,
|
urlh = self._request_webpage(request, None, False,
|
||||||
u'unable to download video info webpage')
|
u'unable to download video info webpage')
|
||||||
|
|
||||||
if urlh.headers.get('Content-Type', '').startswith('video/'): # Direct download
|
if urlh.headers.get('Content-Type', '').startswith('video/'): # Direct download
|
||||||
basename = url.split('/')[-1]
|
basename = url.split('/')[-1]
|
||||||
title,ext = os.path.splitext(basename)
|
title,ext = os.path.splitext(basename)
|
||||||
title = title.decode('UTF-8')
|
title = title.decode('UTF-8')
|
||||||
ext = ext.replace('.', '')
|
ext = ext.replace('.', '')
|
||||||
self.report_direct_download(title)
|
self.report_direct_download(title)
|
||||||
info = {
|
return {
|
||||||
'id': title,
|
'id': title,
|
||||||
'url': url,
|
'url': url,
|
||||||
'uploader': None,
|
'uploader': None,
|
||||||
@@ -85,7 +86,7 @@ class BlipTVIE(InfoExtractor):
|
|||||||
'ext': ext,
|
'ext': ext,
|
||||||
'urlhandle': urlh
|
'urlhandle': urlh
|
||||||
}
|
}
|
||||||
if info is None: # Regular URL
|
|
||||||
try:
|
try:
|
||||||
json_code_bytes = urlh.read()
|
json_code_bytes = urlh.read()
|
||||||
json_code = json_code_bytes.decode('utf-8')
|
json_code = json_code_bytes.decode('utf-8')
|
||||||
@@ -111,7 +112,7 @@ class BlipTVIE(InfoExtractor):
|
|||||||
raise ValueError('Can not determine filename extension')
|
raise ValueError('Can not determine filename extension')
|
||||||
ext = umobj.group(1)
|
ext = umobj.group(1)
|
||||||
|
|
||||||
info = {
|
return {
|
||||||
'id': compat_str(data['item_id']),
|
'id': compat_str(data['item_id']),
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': data['display_name'],
|
'uploader': data['display_name'],
|
||||||
@@ -124,11 +125,9 @@ class BlipTVIE(InfoExtractor):
|
|||||||
'player_url': data['embedUrl'],
|
'player_url': data['embedUrl'],
|
||||||
'user_agent': 'iTunes/10.6.1',
|
'user_agent': 'iTunes/10.6.1',
|
||||||
}
|
}
|
||||||
except (ValueError,KeyError) as err:
|
except (ValueError, KeyError) as err:
|
||||||
raise ExtractorError(u'Unable to parse video information: %s' % repr(err))
|
raise ExtractorError(u'Unable to parse video information: %s' % repr(err))
|
||||||
|
|
||||||
return [info]
|
|
||||||
|
|
||||||
|
|
||||||
class BlipTVUserIE(InfoExtractor):
|
class BlipTVUserIE(InfoExtractor):
|
||||||
"""Information Extractor for blip.tv users."""
|
"""Information Extractor for blip.tv users."""
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
|
|
||||||
__version__ = '2013.12.23.1'
|
__version__ = '2013.12.23.2'
|
||||||
|
Reference in New Issue
Block a user