Skip to content

Commit

Permalink
fix(web): blocked by too many redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Mar 6, 2024
1 parent 239d1f9 commit 3ff5773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/base/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self):
# browser={'browser': 'firefox', 'platform': 'windows', 'mobile': False}) # returns a CloudScraper instance
self.lock = Lock()
self.pool = ThreadPoolExecutor(32)
self.curl_session = curl_cffi.requests.Session()
self.curl_session = curl_cffi.requests.Session(max_redirects=10)

def get_html(self, url: str, headers=None, cookies=None, proxies=True, allow_redirects=True, json_data=False,
content=False,
Expand Down

0 comments on commit 3ff5773

Please sign in to comment.