浏览代码

默认隐式传参更正为显式传参

dongzhaorui 1 年之前
父节点
当前提交
e7e142aa6e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      FworkSpider/untils/attachment_res.py

+ 2 - 1
FworkSpider/untils/attachment_res.py

@@ -236,7 +236,8 @@ class AttachmentDownloader(AliYunService):
         if not file_name or not download_url:
             raise AttachmentNullError
 
-        filestream, filetype = self.fetch_data(callback, download_url, **kwargs)
+        file_kwargs = dict(callback=callback, url=download_url, **kwargs)
+        filestream, filetype = self.fetch_data(**file_kwargs)
         filename = clear_file_type_suffix(file_name, filetype)
         download_url = judge_file_url(download_url)