python项目之 天气程序 带GUI
抓取的数据源
使用的类库
thinter
requests
beautifulsoup
思路
抓取到返回的数据,解析后,存到本地和显示在GUI界面上。
需要下一步更新
下一步需要封装成函数,数据使用词典存。
源码奉上
#encoding = 'utf8'
#########################
##coding by 刘云飞
#########################
import requests
from bs4 import BeautifulSoup
from tkinter import *
import datetime
def refresh():
pass
requests.session()
r = requests.get('http://wthrcdn.etouch.cn/WeatherApi?citykey=101020100')