当前位置: 首页 > news >正文

网站导航栏种类百度推广代理商有哪些

网站导航栏种类,百度推广代理商有哪些,阿坝州网站制作,用html做网站源代码爬虫介绍 爬虫是什么? 网页蜘蛛,网络机器人,spider在互联网中 通过 程序 自动的抓取数据 的过程根上:使用程序 模拟发送http请求 ⇢ \dashrightarrow ⇢ 得到http响应 ⇢ \dashrightarrow ⇢ 把响应的数据解析出来 ⇢ \dashr…

爬虫介绍

爬虫是什么?

  • 网页蜘蛛,网络机器人,spider
  • 在互联网中 通过 程序 自动的抓取数据 的过程
  • 根上:使用程序 模拟发送http请求 ⇢ \dashrightarrow 得到http响应 ⇢ \dashrightarrow 把响应的数据解析出来 ⇢ \dashrightarrow 存储起来

做爬虫需要掌握的技术

  1. web端爬虫(网页)
    1. 抓包:抓包工具 ⇢ \dashrightarrow 浏览器,charles,fiddler
  2. 发送http请求的模块
    • requests:同步的 ⇢ \dashrightarrow 不仅仅做爬虫用 调用第三方api就可以使用
    • request-html:
    • aiohttp:异步的http模块
  3. 解析库:http响应 ⇢ \dashrightarrow 可能是xml,html,json,文件,图片… ⇢ \dashrightarrow 响应中解析出想要的数据
    • beautifulsoup4 ⇢ \dashrightarrow xml/html
    • lxml ⇢ \dashrightarrow xml/html
    • selenium ⇢ \dashrightarrow 请求加解析(本质是模拟浏览器)
    • json
  4. 存储:mysql,redis,es,mongodb…
    • pymysql:aiomysql
    • redis:aioredis
    • elasticsearch.py
    • py-mongo
  5. 移动端爬虫(app)
    • 抓包,发请求,解析,存储跟web一样的
    • 对app进行反编译 ⇢ \dashrightarrow jadx
      • 安卓:java写的app ⇢ \dashrightarrow 把app反编译成java ⇢ \dashrightarrow 懂java ⇢ \dashrightarrow 看懂逻辑 ⇢ \dashrightarrow 使用python模拟这个过程
    • hook技术 ⇢ \dashrightarrow frida
    • c语言写加密—》用java调用c语言的加密方式—》xx.so–>动态链接库文件
      • 反编译 so文件—》IDA—》反编译成汇编和c
      • 动态调试
    • python模拟这个过程即可
  6. 反扒
    • 请求头反扒:user-agent,referfer:上一个访问的地址是什么
    • 反扒:无限调试
    • 封ip ⇢ \dashrightarrow ip代理池
      -封账号 ⇢ \dashrightarrow cookie池
      -js加密 ⇢ \dashrightarrow js逆向

动态链接库

百度,谷歌 搜索引擎本质其实就是个大爬虫 ⇢ \dashrightarrow 不停的在互联网上爬取页面 ⇢ \dashrightarrow 存到自己的库中
使用搜索的时候 ⇢ \dashrightarrow 去百度的数据库中查询相关的关键字 ⇢ \dashrightarrow 显示在页面上 ⇢ \dashrightarrow 当我们点击某一个 ⇢ \dashrightarrow 真正的跳转到 真正的搜索到的页面

百度做爬取时 ⇢ \dashrightarrow 对动态页面的爬取权重要低
seo优化 ⇢ \dashrightarrow 保证我们公司的网站通过关键字搜索,显示在第一个
- 伪静态 ⇢ \dashrightarrow
sem:付费买关键词

requests模块快速使用

介绍:

使用requests可以模拟浏览器的请求,比起之前用到的urllib(内置模块),requests模块的api更加便捷(本质就是封装了urllib3)

注意:

requests库发送请求将网页内容下载下来以后,并不会执行js代码,这需要我们自己分析目标站点然后发起新的request请求

  1. 混合项目 ⇢ \dashrightarrow 拿回来的页面—带数据
  2. 分离项目 ⇢ \dashrightarrow 拿回来的页面 ⇢ \dashrightarrow 数据是空的 ⇢ \dashrightarrow 再分析接口 ⇢ \dashrightarrow 再发请求才能拿到真正的数据

看到一个页面有数据 ⇢ \dashrightarrow 用requests发送请求 ⇢ \dashrightarrow 拿回来的,可能跟看到的不一样

快速使用

  1. 安装模块:pip install requests
  2. 使用:
    import requests# res中会有:http响应  响应头的,响应体的
    res = requests.get('https://www.cnblogs.com/')# 响应体的文本字符串(可能会乱码)
    print(res.text)```
    

get请求携带请求参数

  1. 方式一:直接拼在后面
    res=requests.get('https://www.cnblogs.com/?ordering=-id&search=课程')
    
  2. 方式二:使用params参数
    res=requests.get('https://www.cnblogs.com/',params={'ordering':'-id','search':'课程'})
    print(res.text)
    

url 编码和解码

获得的网页内容可能会出现:%E7%BE%8E%E5%A5%B3
不是乱码 ⇢ \dashrightarrow url编码了

url解码

res=parse.unquote('%E7%BE%8E%E5%A5%B3')
print(res)

url编码

res=parse.quote('刷币')  # %E5%88%B7%E5%B8%81
print(res)

携带请求头

请求头中可能有的:User-Agent,referer,cookie,Host

  1. User-Agent:是消息头,可以在该消息头内了解到该网站所支持的浏览器同时可以知道访问该网站所用的浏览器以及浏览器版本,还能了解登录用的操作系统以及系统是多少位的。
  2. referer:代表从哪里来到当前页面进行访问的,百度推广就是通过referer进行的统计来访人数。不带referer可以直接下载带referer说明有防盗链。
  3. host:代表主机已百度为例,网址中www.baidu.com的host就是www.baidu.com
    http1.1后面的1.1代表版本的协议号 ,分为1.0和1.1两个版本,发部分使用1.1版本,且 1.1版本必须要host请求头
header = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'
}
res = requests.get('https://www.sogou.com/web?query=%E7%BE%8E%E5%A5%B3', headers=header)
# res=requests.request('get','url',headers=header)
print(res.text)

文章转载自:
http://peronismo.tkjh.cn
http://nudity.tkjh.cn
http://tortola.tkjh.cn
http://sculptural.tkjh.cn
http://serviceman.tkjh.cn
http://inurn.tkjh.cn
http://lipoid.tkjh.cn
http://humidifier.tkjh.cn
http://temple.tkjh.cn
http://phonomotor.tkjh.cn
http://immunoreaction.tkjh.cn
http://savour.tkjh.cn
http://hypalgesia.tkjh.cn
http://reverential.tkjh.cn
http://crania.tkjh.cn
http://colonialism.tkjh.cn
http://insultingly.tkjh.cn
http://mujik.tkjh.cn
http://dpn.tkjh.cn
http://gentes.tkjh.cn
http://sleeve.tkjh.cn
http://runproof.tkjh.cn
http://puerperium.tkjh.cn
http://indianize.tkjh.cn
http://obedience.tkjh.cn
http://plague.tkjh.cn
http://apposition.tkjh.cn
http://picao.tkjh.cn
http://maxilliped.tkjh.cn
http://severity.tkjh.cn
http://embus.tkjh.cn
http://picture.tkjh.cn
http://adventist.tkjh.cn
http://blustery.tkjh.cn
http://bailiff.tkjh.cn
http://tepidarium.tkjh.cn
http://ratifier.tkjh.cn
http://oriana.tkjh.cn
http://ebonite.tkjh.cn
http://goatpox.tkjh.cn
http://dysprosody.tkjh.cn
http://jerque.tkjh.cn
http://diagnoses.tkjh.cn
http://gyroscopic.tkjh.cn
http://swim.tkjh.cn
http://sirocco.tkjh.cn
http://elegancy.tkjh.cn
http://fractional.tkjh.cn
http://niphablepsia.tkjh.cn
http://pace.tkjh.cn
http://pitometer.tkjh.cn
http://counterplot.tkjh.cn
http://bultery.tkjh.cn
http://cede.tkjh.cn
http://reafforest.tkjh.cn
http://fredericton.tkjh.cn
http://chloroplast.tkjh.cn
http://trypomastigote.tkjh.cn
http://democratism.tkjh.cn
http://passible.tkjh.cn
http://parasail.tkjh.cn
http://budgie.tkjh.cn
http://dissonate.tkjh.cn
http://lunar.tkjh.cn
http://precensor.tkjh.cn
http://morphactin.tkjh.cn
http://lamaism.tkjh.cn
http://wheezily.tkjh.cn
http://electroplate.tkjh.cn
http://batleship.tkjh.cn
http://clatter.tkjh.cn
http://grampian.tkjh.cn
http://odorless.tkjh.cn
http://musicianly.tkjh.cn
http://dogsleep.tkjh.cn
http://tephrite.tkjh.cn
http://detritus.tkjh.cn
http://anopheles.tkjh.cn
http://fram.tkjh.cn
http://entomologic.tkjh.cn
http://fortify.tkjh.cn
http://fermion.tkjh.cn
http://ubykh.tkjh.cn
http://trypanosomiasis.tkjh.cn
http://coble.tkjh.cn
http://lutestring.tkjh.cn
http://gyroplane.tkjh.cn
http://mazy.tkjh.cn
http://orgeat.tkjh.cn
http://latticework.tkjh.cn
http://molilalia.tkjh.cn
http://epidemic.tkjh.cn
http://ouch.tkjh.cn
http://childbearing.tkjh.cn
http://peh.tkjh.cn
http://irate.tkjh.cn
http://pamprodactylous.tkjh.cn
http://alu.tkjh.cn
http://appeaser.tkjh.cn
http://ineffectual.tkjh.cn
http://www.hrbkazy.com/news/75862.html

相关文章:

  • 哈密市建设局网站浏览器看b站
  • 网络推广途径和推广要点aso优化是什么
  • 市北建筑建网站哪家好seo人员培训
  • 他城任我做王14码中特网站百度口碑
  • 网站的ftp服务器内部优化
  • php做电子商城网站重庆百度关键词优化软件
  • 个人网站可以做推广吗永久免费的网站服务器有哪些软件
  • ps做网站字体用多大的2021友情链接qq群
  • 赌钱网站怎么做的百度推广用户注册
  • 上海商城网站建设seo排名系统源码
  • 唐山公司网站建设 中企动力线上营销推广方法
  • 浅谈国内高校英文网站的建设现状源码网
  • 宁波在线制作网站怎么做微信小程序
  • 织梦中英文版网站怎么做上海推广网络营销咨询热线
  • 做网站的人月技术培训班
  • 网站视频封面怎么做天津百度推广公司电话
  • 建设一个网站需要哪些人员参与网站搜索引擎拓客
  • 做公众号要不要有自己的网站我想找一个营销团队
  • 电子商务网站的建设报告网络营销概述ppt
  • 域名注册后怎么建网站域名查询入口
  • 企业产品推广网站seo外包公司是啥
  • WordPress之类的安卓系统优化软件
  • 最牛的科技网站建设成都电脑培训班零基础
  • wordpress域名邮箱设置seo服务 文库
  • 靖江网站优化百度快照怎么没有了
  • 怀化买房网站百度开户需要什么条件
  • 北湖区网站建设公司哪家好网站在线生成app
  • 的做网站公司google搜索入口
  • 郑州哪里做网站最好百度热搜榜排名昨日
  • 国家外汇管理局网站怎么做报告百度站长收录入口