Sfoglia il codice sorgente

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

dongzhaorui 1 anno fa
parent
commit
e7e142aa6e
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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)