Different HTML Responses Between httpx and requests for Same Request
#3646
Unanswered
lvlh2
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I encountered an issue where using identical headers and accessing the same URL, the responses from
httpxandrequestsare different. Specifically, when scraping images search results from Bing, thedata-nexturlattribute extracted from the HTML response does not update correctly withhttpx, while it works as expected withrequests.Code to Reproduce
Using
httpx(not working correctly)Output:
Note that the
firstparameter remains at32and does not update correctly.Using
requests(working correctly)Output:
Here, the
firstparameter updates correctly (31, 63, etc.), allowing the page turning to work.Environment
httpxVersion: 0.28.1requestsVersion: 2.32.5Beta Was this translation helpful? Give feedback.
All reactions