I just want to better understand what is happening here, I can of course "work around" the problem using urllib2.
import urllib import urllib2 url = "http://www.crutchfield.com/S-pqvJFyfA8KG/p_15410415/Dynamat-10415-Xtreme-Speaker-Kit.html"
http://pae.st/AxDW/ shows this code in action with the exception of / stacktrace. foo.headers and foo.read() work fine
stu@sente.cc ~ $ : curl -I "http://www.crutchfield.com/S-pqvJFyfA8KG/p_15410415/Dynamat-10415-Xtreme-Speaker-Kit.html"
HTTP/1.1 302 Object Moved Cache-Control: private Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 Location: /S-FSTWJcduy5w/p_15410415/Dynamat-10415-Xtreme-Speaker-Kit.html Server: Microsoft-IIS/7.5 Set-Cookie: SESSIONID=FSTWJcduy5w; domain=.crutchfield.com; expires=Fri, 22-Feb-2013 22:06:43 GMT; path=/ Set-Cookie: SYSTEMID=0; domain=.crutchfield.com; expires=Fri, 22-Feb-2013 22:06:43 GMT; path=/ Set-Cookie: SESSIONDATE=02/23/2012 17:07:00; domain=.crutchfield.com; expires=Fri, 22-Feb-2013 22:06:43 GMT; path=/ X-AspNet-Version: 4.0.30319 HostName: cws105 Date: Thu, 23 Feb 2012 22:06:43 GMT
Thanks.
Stuart powers
source share