Compare commits
5 Commits
2015.02.17
...
2015.02.17
Author | SHA1 | Date | |
---|---|---|---|
![]() |
be24c8697f | ||
![]() |
0d93378887 | ||
![]() |
4069766c52 | ||
![]() |
7010577720 | ||
![]() |
8ac27a68e6 |
@@ -23,7 +23,7 @@ class HlsFD(FileDownloader):
|
|||||||
tmpfilename = self.temp_name(filename)
|
tmpfilename = self.temp_name(filename)
|
||||||
|
|
||||||
ffpp = FFmpegPostProcessor(downloader=self)
|
ffpp = FFmpegPostProcessor(downloader=self)
|
||||||
if not ffpp.available():
|
if not ffpp.available:
|
||||||
self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
|
self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
|
||||||
return False
|
return False
|
||||||
ffpp.check_version()
|
ffpp.check_version()
|
||||||
|
@@ -753,9 +753,7 @@ class InfoExtractor(object):
|
|||||||
|
|
||||||
def _is_valid_url(self, url, video_id, item='video'):
|
def _is_valid_url(self, url, video_id, item='video'):
|
||||||
try:
|
try:
|
||||||
self._request_webpage(
|
self._request_webpage(url, video_id, 'Checking %s URL' % item)
|
||||||
HEADRequest(url), video_id,
|
|
||||||
'Checking %s URL' % item)
|
|
||||||
return True
|
return True
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
if isinstance(e.cause, compat_HTTPError):
|
if isinstance(e.cause, compat_HTTPError):
|
||||||
|
@@ -49,15 +49,30 @@ class VideoLecturesNetIE(InfoExtractor):
|
|||||||
thumbnail = (
|
thumbnail = (
|
||||||
None if thumbnail_el is None else thumbnail_el.attrib.get('src'))
|
None if thumbnail_el is None else thumbnail_el.attrib.get('src'))
|
||||||
|
|
||||||
formats = [{
|
formats = []
|
||||||
'url': v.attrib['src'],
|
for v in switch.findall('./video'):
|
||||||
'width': int_or_none(v.attrib.get('width')),
|
proto = v.attrib.get('proto')
|
||||||
'height': int_or_none(v.attrib.get('height')),
|
if not proto in ['http', 'rtmp']:
|
||||||
'filesize': int_or_none(v.attrib.get('size')),
|
continue
|
||||||
'tbr': int_or_none(v.attrib.get('systemBitrate')) / 1000.0,
|
f = {
|
||||||
'ext': v.attrib.get('ext'),
|
'width': int_or_none(v.attrib.get('width')),
|
||||||
} for v in switch.findall('./video')
|
'height': int_or_none(v.attrib.get('height')),
|
||||||
if v.attrib.get('proto') == 'http']
|
'filesize': int_or_none(v.attrib.get('size')),
|
||||||
|
'tbr': int_or_none(v.attrib.get('systemBitrate')) / 1000.0,
|
||||||
|
'ext': v.attrib.get('ext'),
|
||||||
|
}
|
||||||
|
src = v.attrib['src']
|
||||||
|
if proto == 'http':
|
||||||
|
if self._is_valid_url(src, video_id):
|
||||||
|
f['url'] = src
|
||||||
|
formats.append(f)
|
||||||
|
elif proto == 'rtmp':
|
||||||
|
f.update({
|
||||||
|
'url': v.attrib['streamer'],
|
||||||
|
'play_path': src,
|
||||||
|
})
|
||||||
|
formats.append(f)
|
||||||
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '2015.02.17'
|
__version__ = '2015.02.17.2'
|
||||||
|
Reference in New Issue
Block a user