爬取网页数据
2021-03-14 23:36
阅读:564
标签:pen bsp urlopen with open nbsp class url stat urllib 爬取网页数据 标签:pen bsp urlopen with open nbsp class url stat urllib 原文地址:https://www.cnblogs.com/tzxy/p/12803324.html
import urllib.request
# r=urllib.request.urlopen("http://183.247.167.54:7009/#/map")
# print(r.read())#爬取网页源码
r=urllib.request.urlopen("http://183.247.167.54:7009/static/img/logo.ac2237a.png")
rs=r.read()
with open("1.png","wb") as a:
a.write(rs)#爬取图片
评论
亲,登录后才可以留言!