diff --git a/src/you_get/downloader/acfun.py b/src/you_get/downloader/acfun.py index 79eb1b4c..aa880bee 100644 --- a/src/you_get/downloader/acfun.py +++ b/src/you_get/downloader/acfun.py @@ -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): diff --git a/src/you_get/downloader/bilibili.py b/src/you_get/downloader/bilibili.py index 832cd0c4..20e3c467 100644 --- a/src/you_get/downloader/bilibili.py +++ b/src/you_get/downloader/bilibili.py @@ -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"