You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue with the redirection handling logic in HttpxHttpClient. Currently, there's no straightforward way to disable automatic redirect following when initializing HttpxHttpClient. Ideally, it should be possible to configure it like this:
While the follow_redirects argument is correctly passed to the underlying AsyncClient, HttpxHttpClient overrides this behavior in the crawl method by explicitly setting follow_redirects=True:
I assume this was done because AsyncClient defaults to follow_redirects=False, ensuring that HTTP-based crawlers follow redirects by default. However, would it be preferable to handle this differently? For example adding a default follow_redirects argument in kwargs in _get_client method?
The text was updated successfully, but these errors were encountered:
I've encountered an issue with the redirection handling logic in
HttpxHttpClient
. Currently, there's no straightforward way to disable automatic redirect following when initializingHttpxHttpClient
. Ideally, it should be possible to configure it like this:While the
follow_redirects
argument is correctly passed to the underlyingAsyncClient
,HttpxHttpClient
overrides this behavior in thecrawl
method by explicitly settingfollow_redirects=True
:crawlee-python/src/crawlee/http_clients/_httpx.py
Line 168 in 179ec93
I assume this was done because
AsyncClient
defaults tofollow_redirects=False
, ensuring that HTTP-based crawlers follow redirects by default. However, would it be preferable to handle this differently? For example adding a defaultfollow_redirects
argument inkwargs
in_get_client
method?The text was updated successfully, but these errors were encountered: