URL, -1, URL; ASCII 0x??
hex escapes:
Location: /etf/ishares_core_dax0xAE_ucits_etf_de
0xAE URL; . , , -
Location: /etf/ishares_core_dax%AE_ucits_etf_de
Location: /etf/ishares_core_dax%C2%AE_ucits_etf_de
URL- Latin-1 UTF-8.
requests
, Location
:
from requests.sessions import SessionRedirectMixin
def get_redirect_target(
self, resp, _orig=SessionRedirectMixin.get_redirect_target):
try:
return _orig(self, resp)
except UnicodeDecodeError:
return resp.headers['location']
SessionRedirectMixin.get_redirect_target = get_redirect_target
, .
I , .