dongzhaorui 3 år sedan
förälder
incheckning
d8c76a691b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      find_source/crawler/download.py

+ 1 - 1
find_source/crawler/download.py

@@ -56,7 +56,7 @@ class Downloader:
                 response = self._session.get(url, **request_params)
                 # 解决重定向的网站
                 if response.status_code in REDIRECT_STATI:
-                    request_params.pop('allow_redirects')
+                    request_params.update({'allow_redirects': True})
                     continue
                 response.encoding = response.apparent_encoding
                 if response.encoding in SPECIAL_ENCODINGS: