2020
10-09
10-09
Python tkinter界面实现历史天气查询的示例代码
一、实现效果1.python代码importrequestsfromlxmlimportetreeimportreimporttkinterastkfromPILimportImage,ImageTkfromxpinyinimportPinyindefget_image(file_nam,width,height):im=Image.open(file_nam).resize((width,height))returnImageTk.PhotoImage(im)defspider():headers={'user-agent':'Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/535.24(KHTML,likeGecko)Chrome/19.0....
继续阅读 >