●如何用http restful 发送请求request get 一个json数据?

import requests

response = requests.get('https://www.sojson.com/open/api/weather/json.shtml?city=北京',
                         )
print(response
      )

data = response.json()
print(data)
View Code

相关文章: