使用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())
标签:url,movie,resp,request,param,爬取,headers,537.36,豆瓣 来源: https://www.cnblogs.com/xiaoyaoren/p/15796504.html