使用request爬取豆瓣

import  requests


url='https://movie.douban.com/j/search_subjects?'


param={
"type": "movie",
"tag": "热门",
"page_limit": 50,
"page_start": 0

}

headers={
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
}

resp=requests.get(url=url,params=param,headers=headers)

print(resp.request.url)
print(resp.json())
上一篇:大项目中的多行注释JSDoc标签


下一篇:k8s配置拉取镜像密钥