How to get final URL after redirection

nishant bhakta bhaktanishant at gmail.com
Thu Oct 31 12:17:39 EDT 2013


I have a link that will redirect to any-other link and i have to work with that final link.
For example if i have a link "www.bit.ly/2V6CFi" that will redirect to "www.google.com".
Here i want that i take "www.bit.ly/2V6CFi" and find the final redirect link and append "#q=python" to that link and produce an output that is "www.google.com/#q=python".



More information about the Python-list mailing list