daijro / hrequests

🚀 Web scraping for humans

Home Page:https://daijro.gitbook.io/hrequests/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow_redirects parameter does not work as expected

fmarasoglou opened this issue · comments

allow_redirects is supposedly set as True by default, however it appears by default it is set to False.
Even when I enable it I see a strange behavior, where the redirects are not properly followed

commented

Hello,

I was not able to reproduce a case where allow_redirects is set to False by default; however, I have fixed the strange behavior when following relative redirects.

This should work as intended now:

>>> resp = hrequests.get('http://httpbin.org/redirect/2', history=True)
>>> resp
<Response [200]>
>>> resp.history
[<Response [302]>, <Response [302]>]

Hi daijro,
Can you also push the new version to pypi?

commented

Just pushed!