import requests
#通过url获取数据
def get_page(url):
#requests.get 自带 json.load
page = requests.get(url)
page = page.content
#将bytes转换成字符串
page = page.decode('utf-8')
return page
print(get_page('https://www.duitang.com/napi/blog/list/by_search/?kw=%E6%A0%A1%E8%8A%B1&start=0&limit=1000'))