sunxiuwen

中国天气网:

http://www.weather.com.cn/data/sk/101020100.html

颜色处为城市代码,在输入框中输入对应城市,就可以在html中看到对应的城市代码

import requests
r = requests.get(\'http://www.weather.com.cn/data/sk/101020100.html\')
r.encoding = \'utf-8\'
print r.json()[\'weatherinfo\'][\'city\'], r.json()[\'weatherinfo\'][\'WD\'], r.json()[\'weatherinfo\'][\'temp\']

 

分类:

技术点:

相关文章:

  • 2021-12-09
  • 2022-01-01
  • 2021-12-02
  • 2022-02-03
  • 2021-07-10
  • 2021-12-12
  • 2021-06-24
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-08-06
  • 2021-05-11
  • 2021-09-20
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案