All I want is the redirected url after requesting the actual url. This is the actual url https://metric.picodi.net/us/r/19761
, when I hit enter on browser using this url it redirects me to a url like this
https://www.overstock.com/?AID=11557584&PID=9096967&SID=5e479aea42dd4d2c85183aa2&cjevent=2e4090483d7d3c3db27e63d14903c327c7718b978cf0dfa24&entrytrigger=noshow&exittrigger=noshow&fp=F&utm_source=cj&utm_medium=affiliates
I have tried to implement it like this but it s giving me the same url
>>> import requests
>>> r = requests.get('https://metric.picodi.net/us/r/19761', allow_redirects=True)
>>> print(r.url)
https://metric.picodi.net/us/r/19761
>>> r.history
[]
I have also tried the following -
>>> r = requests.head('https://metric.picodi.net/us/r/19761', allow_redirects=True)
>>> print(r.url)
https://metric.picodi.net/us/r/19761
>>> r.history
[]