On Sun, 23 Dec 2012 17:05:47 -0800, iMath wrote: >>>> import urllib.request >>>> response = >>>> urllib.request.urlopen('http://en.wikipedia.org/wiki/ Internet_media_type') > Traceback (most recent call last): > File "<pyshell#1>", line 1, in <module> > response = > urllib.request.urlopen('http://en.wikipedia.org/wiki/ Internet_media_type') [...] > urllib.error.HTTPError: HTTP Error 403: Forbidden > > > why this url generate error ?
Because you are in violation of Wikipedia's terms and services. Please do not try to screen-scrape Wikipedia. Instead, use their API for accessing pages. http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot -- Steven -- http://mail.python.org/mailman/listinfo/python-list