MCPcopy Create free account
hub / github.com/ActiveState/code / open

Method open

recipes/Python/576551_Simple_Web_Crawler/recipe-576551.py:94–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 request.add_header("User-Agent", AGENT)
93
94 def open(self):
95 url = self.url
96 try:
97 request = urllib2.Request(url)
98 handle = urllib2.build_opener()
99 except IOError:
100 return None
101 return (request, handle)
102
103 def fetch(self):
104 request, handle = self.open()

Callers 15

fetchMethod · 0.95
staticMethod · 0.45
setup_routesFunction · 0.45
recipe-576859.pyFile · 0.45
recipe-576810.pyFile · 0.45
open_file_writeFunction · 0.45
recipe-576889.pyFile · 0.45
writeMethod · 0.45
readMethod · 0.45
printInfoPlayAudioFunction · 0.45
viewFunction · 0.45
recipe-576604.pyFile · 0.45

Calls 2

build_openerMethod · 0.80
RequestMethod · 0.45

Tested by

no test coverage detected