1
0
Fork 0

[rh:curlcffi] Add support for curl_cffi

Authored by: coletdjnz, Grub4K, pukkandan, bashonly

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: bashonly <bashonly@protonmail.com>
This commit is contained in:
coletdjnz 2024-03-16 22:52:38 -05:00 committed by bashonly
commit 52f5be1f1e
No known key found for this signature in database
GPG key ID: 783F096F253D15B0
14 changed files with 629 additions and 141 deletions

View file

@ -307,8 +307,7 @@ class RequestsRH(RequestHandler, InstanceStoreMixin):
max_redirects_exceeded = False
session = self._get_instance(
cookiejar=request.extensions.get('cookiejar') or self.cookiejar)
session = self._get_instance(cookiejar=self._get_cookiejar(request))
try:
requests_res = session.request(
@ -316,8 +315,8 @@ class RequestsRH(RequestHandler, InstanceStoreMixin):
url=request.url,
data=request.data,
headers=headers,
timeout=float(request.extensions.get('timeout') or self.timeout),
proxies=request.proxies or self.proxies,
timeout=self._calculate_timeout(request),
proxies=self._get_proxies(request),
allow_redirects=True,
stream=True
)