get wikipedia source failed (urrlib2)

shahargs at gmail.com shahargs at gmail.com
Tue Aug 7 05:34:37 EDT 2007


On 7       , 11:54, shaha... at gmail.com wrote:
> Hi,
> I'm trying to get wikipedia page source with urllib2:
>     usock = urllib2.urlopen("http://en.wikipedia.org/wiki/
> Albert_Einstein")
>     data = usock.read();
>     usock.close();
>     return data
> I got exception because HTTP 403 error. why? with my browser i can't
> access it without any problem?
>
> Thanks,
> Shahar.

This source works fine for other site. the problem is in wikipedia. is
someone now any solution for this problem?




More information about the Python-list mailing list