<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<blockquote
cite="mid:0ee84d3b-0223-4c0b-a089-1722504ed7bc@googlegroups.com"
type="cite">
<pre wrap="">I would want to know if it's possible to trace the url to the new location
</pre>
</blockquote>
<br>
If the webmaster did a proper thing you'll get server 3xx HTTP
header that will point you to new URL. <br>
<br>
<a class="moz-txt-link-freetext" href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection">http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection</a><br>
<br>
If you're using a good library to do your HTTP (like requests) the
URL-following is build in and free<br>
<br>
<pre><span class="gp">>>> </span><span class="n">r</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">'<a class="moz-txt-link-freetext" href="http://github.com">http://github.com</a>'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">r</span><span class="o">.</span><span class="n">url</span>
<span class="go">'<a class="moz-txt-link-freetext" href="https://github.com/">https://github.com/</a>'</span>
<span class="gp">>>> </span><span class="n">r</span><span class="o">.</span><span class="n">status_code</span>
<span class="go">200</span>
<span class="gp">>>> </span><span class="n">r</span><span class="o">.</span><span class="n">history</span>
<span class="go">[<Response [301]>]
If you want to track changes just check if response.history has some items in it.
</span></pre>
<div class="moz-signature">-- <br>
<img src="cid:part1.09030704.01060504@fuse.pl" height="27"
width="30"><br>
Emil Oppeln-Bronikowski <b>|</b> <a class="moz-txt-link-freetext" href="http://fuse.pl">http://fuse.pl</a></div>
</body>
</html>