day04
Python简单代码:
import urllib.request
def getHTML(url):
page = urllib.request.urlopen(url)
html = page.read().decode(“utf-8”)
return html
end =getHTML(“https://www.baidu.com/”)
print(end)
Python简单代码:
import urllib.request
def getHTML(url):
page = urllib.request.urlopen(url)
html = page.read().decode(“utf-8”)
return html
end =getHTML(“https://www.baidu.com/”)
print(end)