Explorar el Código

更新下载器访问失败时返回的文本流

dongzhaorui hace 1 año
padre
commit
8c2b469096
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      find_source/crawler/download.py

+ 1 - 1
find_source/crawler/download.py

@@ -118,7 +118,7 @@ class Downloader:
             response = Response()
             response.status_code = 10001
             response.encoding = 'utf-8'  # 设置默认编码
-            response._content = None  # 设置默认响应文本流
+            response._content = b""  # 设置默认响应文本流
             response.reason = reason
 
         if self.disable_debug_log: