you paste here a lot of links and open all links in single clicks so try it to open links and enjoy.
import urllib2 req = urllib2.Request('http://www.python.org/fish.html') try: resp = urllib2.urlopen(req) except urllib2.URLError, e: if e.code == 404: # do something... else: # ... else: # 200 body = resp.read()
No comments:
Post a Comment