推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Ewig
V2EX  ›  Python

爬虫拉勾网的反爬

  •  
  •   Ewig · Oct 22, 2018 · 6381 views
    This topic created in 2940 days ago, the information mentioned may be changed or developed.
    最近在爬拉勾网 ,但是在爬的过程中遇到好像是滑动验证码
    res = requests.get(companyLink, headers=header, cookies=get_cookies(cookies_str))
    这是请求带的参数

    https://passport.lagou.com/login/login.html?msg=validation&uStatus=2&clientIp=47.105.103.225 请求的时候回偶尔跳转这个登陆页面
    所以我猜是反爬 有人遇到过吗?

    我试过本地稳定 ip 和动态代理,都会有这种情况发生
    12 replies  •  2018-10-23 10:18:13 +08:00
    PulpFunction
    PulpFunction
    Oct 22, 2018
    1
    login 不就是登录吗

    这种网站应该有反爬吧
    violence123456
    violence123456
    Oct 22, 2018
    2
    依稀记得当年被拉勾禁了一段时间 ip23333
    Ewig
    Ewig
    OP
    Oct 22, 2018
    3
    @PulpFunction 我知道有反爬,所以才来问大家最近有人爬过没有
    cuzfinal
    cuzfinal
    Oct 22, 2018
    4
    拉钩的反爬应该挺难弄的,毕竟拉钩好多数据就是自己爬的。
    wersonliu9527
    wersonliu9527
    Oct 22, 2018
    5
    我们公司爬烂了,长期爬最好用代理 ip,一次的话本地 ip 加 cooki 就行
    post 请求 'https://www.lagou.com/jobs/positionAjax.json?px=new&needAddtionalResult=false' 这个接口
    参数下面自己循环变换
    data = {
    'first': 'true',
    'pn': 页码,
    'kd': 关键字)
    }
    LeungV2
    LeungV2
    Oct 22, 2018
    6
    爬虫 爬虫,听起来很像很好玩
    571726193
    571726193
    Oct 22, 2018
    7
    谁能给我详细解释一下爬虫 ,干什么用的 ,通俗易懂的
    zxcvsh
    zxcvsh
    Oct 22, 2018 via iPhone
    8
    @571726193 用代码替代浏览器手动访问网页,并将目标网页元素 down 下来
    Loooom
    Loooom
    Oct 22, 2018
    9
    @wersonliu9527 低调低调...
    Ewig
    Ewig
    OP
    Oct 22, 2018
    10
    @wersonliu9527 我用本地 ip 会 302 跳转 验证码这是咋回事
    ppi
    ppi
    Oct 23, 2018
    11
    "success": false,
    "msg": "您操作太频繁,请稍后再访问",
    Ewig
    Ewig
    OP
    Oct 23, 2018
    12
    @ppi 你发的这是啥意思
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4407 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 71ms · UTC 01:16 · PVG 09:16 · LAX 17:16 · JFK 20:16
    ♥ Do have faith in what you're doing.