HTTP Error 404: Not Found search by Google
\bug\bsoup.py in <module> (arguments ▶)
- exception_hook.enable()
- # <title="počítadlo přístupů:="" pocitadlo.abz.cz=""></title="počítadlo>
- # url = "http://tuberadio.6f.sk/"
- # BOM before DOCTYPE
- url = "http://turnaje.4fan.cz/news.php"
- page = urllib2.urlopen(url)
- soup = BeautifulSoup(page.read())
- page.close()
- html = str(soup)
\Python2.6\lib\urllib2.py in urlopen (arguments ▶)
- _opener = None
- def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
- global _opener
- if _opener is None:
- _opener = build_opener()
- return _opener.open(url, data, timeout)
- def install_opener(opener):
- global _opener
- _opener = opener
\Python2.6\lib\urllib2.py in open (arguments ▶)
- # post-process response
- meth_name = protocol+"_response"
- for processor in self.process_response.get(protocol, []):
- meth = getattr(processor, meth_name)
- response = meth(req, response)
- return response
- def _open(self, req, data=None):
\Python2.6\lib\urllib2.py in http_response (arguments ▶)
- # According to RFC 2616, "2xx" code indicates that the client's
- # request was successfully received, understood, and accepted.
- if not (200 <= code < 300):
- response = self.parent.error(
- 'http', request, response, code, msg, hdrs)
- return response
- https_response = http_response
\Python2.6\lib\urllib2.py in error (arguments ▶)
- if result:
- return result
- if http_err:
- args = (dict, 'default', 'http_error_default') + orig_args
- return self._call_chain(*args)
- # XXX probably also want an abstract factory that knows when it makes
- # sense to skip a superclass in favor of a subclass and when it might
- # make sense to include both
\Python2.6\lib\urllib2.py in _call_chain (arguments ▶)
- # could. Otherwise, they return the response.
- handlers = chain.get(kind, ())
- for handler in handlers:
- func = getattr(handler, meth_name)
- result = func(*args)
- if result is not None:
- return result
- def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
\Python2.6\lib\urllib2.py in http_error_default (arguments ▶)
- https_response = http_response
- class HTTPDefaultErrorHandler(BaseHandler):
- def http_error_default(self, req, fp, code, msg, hdrs):
- raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
- class HTTPRedirectHandler(BaseHandler):
- # maximum number of redirections to any single URL
- # this is needed because of the state that cookies introduce