with open('douban.json','w',encoding='utf-8') as f:
    f.write(json.dumps(json.loads(response),ensure_ascii=False,indent=2))#这个方法太秀了,其实STR方法也可以让这个字典变成字符串,但是功能没有这个强大

 

相关文章:

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