~~~
#模拟翻页请求
import requests
url = "https://movie.douban.com/j/new\_search\_subjects"
# 重新封装参数
head={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_14\_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36'
}
params={
"sort": "U",
"range": "0,10",
"tags": "",
"start": 0,
}
resp = requests.get(url=url,params=params,headers=head)
print(resp.json())
resp.close()
~~~