urllib2.HTTPError: HTTP Error 204: NoContent
Philip Semanchuk
philip at semanchuk.com
Sun Oct 19 12:49:42 EDT 2008
On Oct 19, 2008, at 6:13 AM, silk.odyssey wrote:
> I am getting the following error trying to download an html page using
> urllib2.
>
> urllib2.HTTPError: HTTP Error 204: NoContent
>
> The url is of this type:
>
> http://www.amazon.com/gp/offer-listing/B000KJX3A0%3FSubscriptionId%3D183VXJS74KNQ89D0NRR2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3DB000KJX3A0
>
> I can open it in my browser without problems.Any ideas on a solution?
Are you changing the user-agent? Some sites sniff user agents and
return different results to browsers than to suspected bots.
I'd try it from here if you post a self-contained sample that
demonstrates the problem. Should only take a couple of lines.
More information about the Python-list
mailing list