readtxt.py读取文档
# -*- coding: utf-8 -*-
#读取txt文档
from urllib.request import urlopen
#请求url并把结果用utf-8编码
html = urlopen("https://en.wikipedia.org/robots.txt")
print(html.read().decode("utf-8"))
readtxt.py读取文档
# -*- coding: utf-8 -*-
#读取txt文档
from urllib.request import urlopen
#请求url并把结果用utf-8编码
html = urlopen("https://en.wikipedia.org/robots.txt")
print(html.read().decode("utf-8"))