책 내용에 대한 무단배포 방지를 위해 최소한으로 정리
from urllib.request import urlopen
url = 'https://www.python.org/'
with urlopen(url) as f:
doc = f.read().decode()
with open('pythonhome.html', 'w') as h:
h.wrtielines(doc)
책 내용에 대한 무단배포 방지를 위해 최소한으로 정리
from urllib.request import urlopen
url = 'https://www.python.org/'
with urlopen(url) as f:
doc = f.read().decode()
with open('pythonhome.html', 'w') as h:
h.wrtielines(doc)
Comments