[videoob] improve m3u8 management in download
This commit is contained in:
parent
648fc82b39
commit
0a761c5d9d
1 changed files with 9 additions and 1 deletions
|
|
@ -101,7 +101,15 @@ class Videoob(ReplApplication):
|
|||
elif u'm3u8' == video.ext:
|
||||
_dest, _ = os.path.splitext(dest)
|
||||
dest = u'%s.%s' % (_dest, 'mp4')
|
||||
args = ('wget',) + tuple(line for line in self.read_url(video.url) if not line.startswith('#')) + ('-O', dest)
|
||||
content = tuple()
|
||||
baseurl = video.url.rpartition('/')[0]
|
||||
for line in self.read_url(video.url):
|
||||
if not line.startswith('#'):
|
||||
if not line.startswith('http'):
|
||||
line = u'%s/%s' % (baseurl, line)
|
||||
content += (line,)
|
||||
|
||||
args = ('wget',) + content + ('-O', dest)
|
||||
else:
|
||||
if check_exec('wget'):
|
||||
args = ('wget', '-c', video.url, '-O', dest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue