Acfun & Bilibili: 'Downloading %s ...\n'

This commit is contained in:
Mort Yao 2014-05-29 02:42:57 +02:00
parent 822c8394a5
commit f10123b9e9
2 changed files with 3 additions and 3 deletions

View File

@ -38,11 +38,11 @@ def acfun_download_by_vid(vid, title=None, output_dir='.', merge=True, info_only
if not info_only:
title = get_filename(title)
try:
print('Downloading %s ...' % (title + '.cmt.json'))
print('Downloading %s ...\n' % (title + '.cmt.json'))
cmt = get_srt_json(danmakuId)
with open(os.path.join(output_dir, title + '.cmt.json'), 'w') as x:
x.write(cmt)
print('Downloading %s ...' % (title + '.cmt_lock.json'))
print('Downloading %s ...\n' % (title + '.cmt_lock.json'))
cmt = get_srt_lock_json(danmakuId)
with open(os.path.join(output_dir, title + '.cmt_lock.json'), 'w') as x:
x.write(cmt)

View File

@ -100,7 +100,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
if not info_only:
title = get_filename(title)
print('Downloading %s ...' % (title + '.cmt.xml'))
print('Downloading %s ...\n' % (title + '.cmt.xml'))
xml = get_srt_xml(id)
with open(os.path.join(output_dir, title + '.cmt.xml'), 'w', encoding='utf-8') as x:
x.write(xml)