'''
爬去豆瓣电影数据
了解ajax的基本爬去方式 ''' from urllib import request
import json
import ssl url = "https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&start=40&limit=20" context = ssl._create_unverified_context()
rsp = request.urlopen(url,context=context)
data = rsp.read().decode() data = json.loads(data) print(type(data))
print(data) 运行结果:

了解ajax基本爬取方式-LMLPHP

05-26 05:38