HTTP request error with urlopen

spandana g spandanagella at
Fri Jul 4 04:14:05 CEST 2008

Hello ,

          I have written a code to get the page source of the google search
page .. this is working for other urls. I have this problem with

import re
from urllib2 import urlopen

Traceback (most recent call last) :
File "C:/Python25/", line 5,in <module>
File "C:\Python25\lib\", line 124 , in urlopen,  data)
File "C:\Python25\lib\", line  387 , in open
   response =meth(req, response)
File "C:\Python25\lib\", line 498 , in http_response
   'http',   request,  response,  code,  msg,  hdrs)
File  "C:\Python25\lib\",  line 425,  in error
   return self._call_chain(*args)
File  "C:\Python25\lib\", line 360,  in __call_chain
   result = func(*args)
File "C:\Python25\lib\", line 506, in http_error_default
   raise HTTPError(req.get_full_url(),  code,  msg,  hdrs,  fp)
HTTPError:  HTTP Error 403: Forbidden

Actually urlopen is working for google labs sets page but not for the  and even I have same problem with wikipedia . Please let me know
.. If any one of have any idea about this .

Thank You,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list