Acfun & Bilibili: fix #148

This commit is contained in:
Mort Yao 2013-04-14 18:02:01 +02:00
parent 92490d35ee
commit 3a3dd740f5
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ def acfun_download_by_id(id, title = None, output_dir = '.', merge = True, info_
if not info_only:
print('Downloading %s ...' % (title + '.cmt.json'))
cmt = get_srt_json(vid)
with open(title + '.cmt.json', 'w') as x:
with open(os.path.join(output_dir, title + '.cmt.json'), 'w') as x:
x.write(cmt)
def acfun_download(url, output_dir = '.', merge = True, info_only = False):

View File

@ -101,7 +101,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
if not info_only:
print('Downloading %s ...' % (title + '.cmt.xml'))
xml = get_srt_xml(id)
with open(title + '.cmt.xml', 'w') as x:
with open(os.path.join(output_dir, title + '.cmt.xml'), 'w') as x:
x.write(xml)
site_info = "bilibili.tv"