url = ‘https://image.baidu.com/search/acjson?’
param = {
‘tn’: ‘resultjson_com’,
‘logid’: ’ 7517080705015306512’,
‘ipn’: ‘rj’,
‘ct’: ‘201326592’,
‘is’: ‘’,
‘fp’: ‘result’,
‘queryWord’: ‘彭于晏’,
‘cl’: ‘2’,
‘lm’: ‘-1’,
‘ie’: ‘utf-8’,
‘oe’: ‘utf-8’,
‘adpicid’: ‘’,
‘st’: ‘’,
‘z’: ‘’,
‘ic’: ‘’,
‘hd’: ‘’,
‘latest’: ‘’,
‘copyright’: ‘’,
‘word’: ‘彭于晏’,
‘s’: ‘’,
‘se’: ‘’,
‘tab’: ‘’,
‘width’: ‘’,
‘height’: ‘’,
‘face’: ‘’,
‘istype’: ‘’,
‘qc’: ‘’,
‘nc’: ‘1’,
‘fr’: ‘’,
‘expermode’: ‘’,
‘force’: ‘’,
‘cg’: ‘star’,
‘pn’: ‘30’,
‘rn’: ‘30’,
‘gsm’: ‘1e’,
}http://www.yesedata.com/
# 将编码形式转换为utf-8
response = requests.get(url=url, headers=header, params=param)
response.encoding = ‘utf-8’
response = response.text
print(response)
python爬取百度图片
最新推荐文章于 2024-01-07 16:05:34 发布