赞
踩
分别导入re os requests
- import os
- import re
- import requests
'运行
2.获取网站源代码
- def get_html(url,headers,params):
- response = requests.get(url,headers=headers,params=params)
- #源代码的编写方式
- response.encoding = "utf-8"
- if response.status_code == 200:
- return response.text
- else:
- print("错误")
'运行
3.提取图片源地址
- def parse_pic_url(html):
- result = re.findall('thumbURL":"(.*?)"',html,re.S)
- return result
'运行
4.获取图片二进制码
- def get_pic_content(url):
- response = requests.get(url)
- return response.content
-
- def save_pic(fold_name,content,pic_name):
- with open(fold_name + "/" + str(pic_name)+".jpg","wb") as f:
- f.write(content)
- f.close()
5.定义main函数调用get_html函数,先看详细代码,
- def main():
-
- pic_name = 7777
- # 构建循环
- for i in range(2):
- url="https://image.baidu.com/search/acjson?tn=resulttagjson&logid=10559289060731775977&ie=utf-8&fr=ala&word=%E5%A4%A7%E7%86%8A%E7%8C%AB%E5%8F%AF%E7%88%B1&ipn=r&fm=index&pos=history&queryWord=%E5%A4%A7%E7%86%8A%E7%8C%AB%E5%8F%AF%E7%88%B1&cl=2&lm=-1&oe=utf-8&adpicid=&st=&z=&ic=&hd=&latest=©right=&s=&se=&tab=&width=&height=&face=&istype=&qc=&nc=&expermode=&nojc=&isAsync=true&pn=90&rn=30&itg=1&gsm=5a&1695868895378="
- headers={
- "Accept": "text/plain, */*; q=0.01",
- "Accept-Encoding": "gzip, deflate",
- "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
- "Cache-Control": "max-age=0",
- "Connection": "keep-alive",
- "Cookie": "BDqhfp=%E5%A4%A7%E7%86%8A%E7%8C%AB%26%26NaN-1undefined%26%261428%26%263; MCITY=-%3A; BDUSS=WM5MWpGWndPV2NRSmMxbHM4dDEyajYwUGQ3MFZSclVnb0RjSlNRT1VlMUstYkJrSVFBQUFBJCQAAAAAABAAAAEAAACk79r6b2dmZ2doAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpsiWRKbIlke; BDUSS_BFESS=WM5MWpGWndPV2NRSmMxbHM4dDEyajYwUGQ3MFZSclVnb0RjSlNRT1VlMUstYkJrSVFBQUFBJCQAAAAAABAAAAEAAACk79r6b2dmZ2doAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpsiWRKbIlke; BAIDUID=15D8AF7362A233007142B2B2ACCE80C2:FG=1; H_WISE_SIDS=234020_110085_268708_259642_256154_269782_269832_269904_270597_271022_271170_267659_271319_271269_270102_271812_272226_270055_272278_273119_273301_272641_273736_274078_269609_273917_273044_272560_197096_179345_274765_274761_273982_275069_272801_275147; PSTM=1695112087; BIDUPSID=E9DD811BDB5CB67FE5A3F85BAFCEEF52; indexPageSugList=%5B%22%E4%BA%8C%E6%AC%A1%E5%85%83%E5%9B%BE%E7%89%87%22%2C%22%E5%8A%A8%E6%BC%AB%E5%9B%BE%E7%89%87%22%2C%22%E6%B2%99%E5%8F%91log%22%2C%22%E7%8C%AB%22%2C%22%E7%BD%91%E9%A1%B5%E8%83%8C%E6%99%AF%E5%9B%BE%22%2C%22%E8%83%8C%E6%99%AFbmp%22%2C%22%E5%8D%8A%E5%AF%BC%E4%BD%93%22%2C%22%E5%9C%BA%E6%95%88%E5%BA%94%E7%AE%A1%E5%9B%BE%E7%89%87%22%2C%22%E6%99%B6%E9%97%B8%E7%AE%A1%E5%9B%BE%E7%89%87%22%5D; H_PS_PSSID=26350; BAIDUID_BFESS=15D8AF7362A233007142B2B2ACCE80C2:FG=1; ZFY=aUZeZY4WXw0POTirA:BtrNIadn49in1kQ7bqBYWeWk94:C; delPer=1; PSINO=7; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; BA_HECTOR=842k24a0800h250g040k250d1ih9kv01o; BCLID=12000947481008567227; BCLID_BFESS=12000947481008567227; BDSFRCVID=2p8OJexroG0ZmSbqQQGl-hLfHuweG7bTDYrEOwX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4NmNlMTIyZTcxMzg4N2U1ZGM1ZTg4OGNmMDg2YjJmMjljMWIwMzEwZTk4ZjBmYWYxMjg2ZmI0NGE5YjljOTAwNTJlN2ZiNjNmYzBiMzY1MzIxN2FlNzE0MzE3ZmE3MGZjNzQyMTU2ZGQ1ZDNhYTM0Nw==",
- "Host": "image.baidu.com",
- "Referer": "https: // image.baidu.com / search / index?tn = baiduimage & ct = 201326592 & lm = -1 & cl = 2 & ie = gb18030 & word = % B4 % F3 % D0 % DC % C3 % A8 & fr = ala & ala = 1 & alatpl = normal & pos = 0 & dyTabStr = MTEsMCwxLDYsMyw0LDUsMiw4LDcsOQ%3D%3D",
- "sec-ch-ua": '"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',
- "sec-ch-ua-mobile": "?0",
- "sec-ch-ua-platform": '"Windows"',
- "Sec-Fetch-Dest": "empty",
- "Sec-Fetch-Mode": "cors",
- "Sec-Fetch-Site": "same-origin",
- "Sec-Fetch-User": "?1",
- "Upgrade-Insecure-Requests": "1",
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.57",
- }
- params={
-
- "logid":" 10545277816764792645",
- "ipn":" rj",
- "ct":" 201326592",
- "fp":" result",
- "fr":" ala",
- "word":" 大熊猫",
- "queryWord":" 大熊猫",
- "cl":" 2",
- "lm":" -1",
- "ie":" utf-8",
- "oe":" utf-8",
- "pn":str(int(i+1)*30),
- "rn":" 30",
- "gsm":" 3c",
-
-
- }
'运行
(1)首先打开百度图片,找到自己需要爬取的图片,例爬取动漫头像
(2)鼠标单击右键或者用F12打开开发者模式,例
(3)找到网络单元下的Fetch/XHR
(4)用鼠标滑动网页,可以明显看到网络单元下出现开头名为acjson的数据,点击其中一个
在标头能看到一个请求URL,这个是我们所需要的网址
(5)继续往下滑动,可以看到有一个请求标头,这是我们headers里面的所有内容
将其所有复制,在复制前可以用""" """注释后进行修改,然后修改:":"前后的文本都要加双引号"",文本中有双引号的就加单引号'',改成如上代码的形式
(6)接下来就是params的内容,该内容在负载里面
如下是完整代码
- #导入库
- import re
- import os
- import requests
-
- #获取网站源代码
- def get_html(url,headers,params):
- response = requests.get(url,headers=headers,params=params)
- #设置源代码的编码方式
- response.encoding="utf-8"
- if response.status_code == 200:
- return response.text
- else:
- print("网站源码获取错误")
-
- #提取图片源代码
- def parse_pic_url(html):
- result = re.findall('thumbURL":"(.*?)"',html,re.S)
- return result
-
- #获取二进制码
- def get_pic_content(url):
- response = requests.get(url)
- return response.content
-
- #保存图片
- def save_pic(content,pic_name):
- with open("大熊猫/"+str(pic_name)+".jpg","wb") as f:
- f.write(content)
- f.close()
-
-
-
- #定义main函数调用get_html函数
- def main():
-
- pic_name = 7777
- # 构建循环
- for i in range(2):
- url="https://image.baidu.com/search/acjson?tn=resulttagjson&logid=10559289060731775977&ie=utf-8&fr=ala&word=%E5%A4%A7%E7%86%8A%E7%8C%AB%E5%8F%AF%E7%88%B1&ipn=r&fm=index&pos=history&queryWord=%E5%A4%A7%E7%86%8A%E7%8C%AB%E5%8F%AF%E7%88%B1&cl=2&lm=-1&oe=utf-8&adpicid=&st=&z=&ic=&hd=&latest=©right=&s=&se=&tab=&width=&height=&face=&istype=&qc=&nc=&expermode=&nojc=&isAsync=true&pn=90&rn=30&itg=1&gsm=5a&1695868895378="
- headers={
- "Accept": "text/plain, */*; q=0.01",
- "Accept-Encoding": "gzip, deflate",
- "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
- "Cache-Control": "max-age=0",
- "Connection": "keep-alive",
- "Cookie": "BDqhfp=%E5%A4%A7%E7%86%8A%E7%8C%AB%26%26NaN-1undefined%26%261428%26%263; MCITY=-%3A; BDUSS=WM5MWpGWndPV2NRSmMxbHM4dDEyajYwUGQ3MFZSclVnb0RjSlNRT1VlMUstYkJrSVFBQUFBJCQAAAAAABAAAAEAAACk79r6b2dmZ2doAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpsiWRKbIlke; BDUSS_BFESS=WM5MWpGWndPV2NRSmMxbHM4dDEyajYwUGQ3MFZSclVnb0RjSlNRT1VlMUstYkJrSVFBQUFBJCQAAAAAABAAAAEAAACk79r6b2dmZ2doAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpsiWRKbIlke; BAIDUID=15D8AF7362A233007142B2B2ACCE80C2:FG=1; H_WISE_SIDS=234020_110085_268708_259642_256154_269782_269832_269904_270597_271022_271170_267659_271319_271269_270102_271812_272226_270055_272278_273119_273301_272641_273736_274078_269609_273917_273044_272560_197096_179345_274765_274761_273982_275069_272801_275147; PSTM=1695112087; BIDUPSID=E9DD811BDB5CB67FE5A3F85BAFCEEF52; indexPageSugList=%5B%22%E4%BA%8C%E6%AC%A1%E5%85%83%E5%9B%BE%E7%89%87%22%2C%22%E5%8A%A8%E6%BC%AB%E5%9B%BE%E7%89%87%22%2C%22%E6%B2%99%E5%8F%91log%22%2C%22%E7%8C%AB%22%2C%22%E7%BD%91%E9%A1%B5%E8%83%8C%E6%99%AF%E5%9B%BE%22%2C%22%E8%83%8C%E6%99%AFbmp%22%2C%22%E5%8D%8A%E5%AF%BC%E4%BD%93%22%2C%22%E5%9C%BA%E6%95%88%E5%BA%94%E7%AE%A1%E5%9B%BE%E7%89%87%22%2C%22%E6%99%B6%E9%97%B8%E7%AE%A1%E5%9B%BE%E7%89%87%22%5D; H_PS_PSSID=26350; BAIDUID_BFESS=15D8AF7362A233007142B2B2ACCE80C2:FG=1; ZFY=aUZeZY4WXw0POTirA:BtrNIadn49in1kQ7bqBYWeWk94:C; delPer=1; PSINO=7; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; BA_HECTOR=842k24a0800h250g040k250d1ih9kv01o; BCLID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r=1.0.1_NmY0ZmI3NmRlNzYzMmI2MTEyMTVmZmJhM2QzMTI5ZjUyYTU1OWIwMmQzZjNmNjE4NmNlMTIyZTcxMzg4N2U1ZGM1ZTg4OGNmMDg2YjJmMjljMWIwMzEwZTk4ZjBmYWYxMjg2ZmI0NGE5YjljOTAwNTJlN2ZiNjNmYzBiMzY1MzIxN2FlNzE0MzE3ZmE3MGZjNzQyMTU2ZGQ1ZDNhYTM0Nw==",
- "Host": "image.baidu.com",
- "Referer": "https: // image.baidu.com / search / index?tn = baiduimage & ct = 201326592 & lm = -1 & cl = 2 & ie = gb18030 & word = % B4 % F3 % D0 % DC % C3 % A8 & fr = ala & ala = 1 & alatpl = normal & pos = 0 & dyTabStr = MTEsMCwxLDYsMyw0LDUsMiw4LDcsOQ%3D%3D",
- "sec-ch-ua": '"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',
- "sec-ch-ua-mobile": "?0",
- "sec-ch-ua-platform": '"Windows"',
- "Sec-Fetch-Dest": "empty",
- "Sec-Fetch-Mode": "cors",
- "Sec-Fetch-Site": "same-origin",
- "Sec-Fetch-User": "?1",
- "Upgrade-Insecure-Requests": "1",
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.57",
- }
- params={
-
- "logid":" 10545277816764792645",
- "ipn":" rj",
- "ct":" 201326592",
- "fp":" result",
- "fr":" ala",
- "word":" 大熊猫",
- "queryWord":" 大熊猫",
- "cl":" 2",
- "lm":" -1",
- "ie":" utf-8",
- "oe":" utf-8",
- "pn":str(int(i+1)*30),
- "rn":" 30",
- "gsm":" 3c",
-
-
- }
- html = get_html(url,headers,params)
- #print(html)
- result = parse_pic_url(html)
- #定义图片名字
- # pic_name = 0
- for item in result:
- #调用函数,获取二进制源码
- pic_content = get_pic_content(item)
- # print(pic_content)
- # 调用函数,保存图片
- save_pic(pic_content,pic_name)
- pic_name +=1
- print("正在保存第"+str(pic_name))
- #执行main函数
- if __name__ == '__main__':
- main()
'运行
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。