0

I want to retrieve the target url of a redirect url using Python.

Example: https://www.mydealz.de/visit/threadmain/2127697

The redirect url leads to the target url: https://www.nassersolar.de/p/set-2-x-410w-ja-solar-module-600w-wechselrichter

I have found some duplicate topics, but I was unsuccessful applying the solutions to my redirect url, for instance:

r = requests.get('https://www.mydealz.de/visit/threadmain/2127697') 
print(r.url)

How can I retrieve the target url of the redirect using Python?

Scijens
  • 541
  • 2
  • 11

0 Answers0