소스 검색

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

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)