蓝绝

博客园 首页 新随笔 联系 订阅 管理
  232 随笔 :: 1 文章 :: 0 评论 :: 25926 阅读

随笔分类 -  python爬虫

摘要:IP代理的方式免费代理IP : https://www.xicidaili.com/nn/ 大象代理 :收费 http://www.daxiangdaili.com/ 快代理:收费 https://www.kuaidaili.com/ from urllib.request import build 阅读全文
posted @ 2023-01-11 21:39 蓝绝 阅读(42) 评论(0) 推荐(0) 编辑

摘要:''' import urllib.request url='https://www.baidu.com' resp=urllib.request.urlopen(url) ''' import urllib.request url='https://www.baidu.com' headers={ 阅读全文
posted @ 2023-01-11 21:37 蓝绝 阅读(17) 评论(0) 推荐(0) 编辑

摘要:-豆瓣有反爬。加入headers(请求头) import urllib.request url='https://movie.douban.com/' headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWeb 阅读全文
posted @ 2023-01-11 21:01 蓝绝 阅读(31) 评论(0) 推荐(0) 编辑

摘要:--正常网页读取 import urllib.request url='https://www.lingdianshuwu.com/' #发送请求 resp=urllib.request.urlopen(url) #这个网页只有get html=resp.read().decode('gbk') # 阅读全文
posted @ 2023-01-11 20:42 蓝绝 阅读(95) 评论(0) 推荐(0) 编辑

摘要:import urllib.parse #导入库 kw={'wd':'马士兵'} #需要编码的参数 #编码 result=urllib.parse.urlencode(kw) print(result) #解码 res=urllib.parse.unquote(result) print(res) 阅读全文
posted @ 2023-01-11 10:41 蓝绝 阅读(16) 评论(0) 推荐(0) 编辑

摘要:页面滚动的时候,整个页面是否发生了刷新,如果页面没有刷新数据就自动生成的, 说明这个时候数据是通过Ajax生成并渲染到咱们界面上的。 反之数据就是通过服务器通过后台生成并加载的,叫静态数据 阅读全文
posted @ 2023-01-11 10:11 蓝绝 阅读(12) 评论(0) 推荐(0) 编辑

摘要:------------------------------- ---------------------------------------------------- 阅读全文
posted @ 2023-01-09 21:00 蓝绝 阅读(18) 评论(0) 推荐(0) 编辑

摘要:---------------------------- 阅读全文
posted @ 2023-01-09 20:59 蓝绝 阅读(15) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 20:56 蓝绝 阅读(17) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 20:00 蓝绝 阅读(12) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 19:59 蓝绝 阅读(22) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 19:58 蓝绝 阅读(20) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 19:57 蓝绝 阅读(17) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2023-01-09 19:54 蓝绝 阅读(18) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示