示例:

import requests
url = "https://m.douban.com/rexxar/api/v2/recommend_feed?alt=json&next_date=2019-02-11&loc_id=108288&gender=&birthday=&udid=9fcefbf2acf1dfc991054ac40ca5114be7cd092f&for_mobile=1"
html_str = requests.get(url).text
# json.loads把json字符串转化为python类型
ret1 = json.loads(html_str)
# 美化输出
pprint(ret1)
# 普通输出
print(ret1)

# 运行结果
# 美化输出
{'code': 1287,
 'localized_message': '',
 'msg': 'invalid_request_1284',
 'request': 'GET /rexxar/v2/recommend_feed'}
# 普通输出
{'msg': 'invalid_request_1284', 'code': 1287, 'request': 'GET /rexxar/v2/recommend_feed', 'localized_message': ''}

发表回复