(m1) parkkyusik@MacBookPro html % python 정규표현식_EX.py
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/http/client.py", line 922, in connect
self.sock = self._create_connection(
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
OSError: [Errno 50] Network is down
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "정규표현식_EX.py", line 4, in <module>
html = urllib.request.urlopen(url) # html 소스요청 (request.urlopen)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 563, in error
result = self._call_chain(*args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 1383, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m1/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 50] Network is down>
comment