2021-04-26 例程

from PIL import Image
img = Image.open("deep_copy.jpg")
img.show()
aa = input()
img.close()

 

import urllib.request
data = urllib.request.urlopen("https://music.liuzhijin.cn/")
aa = data.read()
with open("d:/aa.html",'wb') as f:
    f.write(aa)

 

import urllib.request
import re
data = urllib.request.urlopen("https://music.liuzhijin.cn/")
aa = data.read().decode("utf-8")
pat = "一听"
ress = re.compile(pat).findall(aa)
with open("d:/aa.txt","w") as f:
    f.write(str(ress))

 

上一篇:Python调用有道api进行翻译


下一篇:20193304 2020-2021-2 《Python程序设计》实验四报告