import requests
import json

if __name__ == "__main__":
    url = 'https://movie.douban.com/j/chart/top_list'
    param = {
        'type':'24',
        'interval_id':'100:90',
        'action':'',
        'start':'0',
        'limit':'20',
    }
    headers = {
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2626.106 Safari/537.36'
    }
    response = requests.get(url=url,params=param,headers=headers)

    list_data = response.json()

    fp = open('./douban.json', 'w', encoding='utf-8')
    json.dump(list_data,fp=fp,ensure_ascii=False)

    print('over!!!')



相关文章:

  • 2021-10-05
  • 2021-11-13
  • 2022-12-23
  • 2021-12-06
  • 2022-01-18
  • 2021-08-11
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-08-12
  • 2021-10-05
  • 2021-11-24
  • 2021-07-15
  • 2021-11-06
相关资源
相似解决方案