??.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:xuexi 作者: liwanlei 项目源码 文件源码
def Get_weather(city):
    url = 'http://wthrcdn.etouch.cn/WeatherApi?city=' + urllib.parse.quote(city)
    weather = urllib.request.urlopen(url).read()
    weather_data = gzip.decompress(weather).decode('utf-8')
    soup = BeautifulSoup(weather_data)
    return soup
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号