웹 클라이언트 모듈

# 네트워크
import urllib.request as req
from urllib.error import URLError 
# f = req.urlopen( "<http://www.daum.net>" )
# print( f.read( 100 ).decode( "utf-8" ) )    

# re = req.Request( "<http://www.daum.net1>" )
# try :
#     req.urlopen( re )
# except URLError as e :
#     print( e.reason )

response = req.urlopen( "<http://www.daum.net>" )
# print( response )
print( "url : ", response.geturl() )
headers = response.info()
print( "date : ", headers["date"] )
print( headers )
data = response.read()
print( len( data ) )