I want to get the last URL that redirected from a homepage website with JavaScript using Python:
window.location = sameaddr
I tried to do that with the requests
module, but I didn't manage to get it working.
I think that the last remedy open website in background and get last URL from that.
I tried the steps in this post:
r = requests.head(url, allow_redirects=True)
print(r.url)
Please help me some guidance for a solution.