V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2018-10-22 10:31:39 +08:00 · 1153 次点击
    这是一个创建于 1984 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近我在爬拉钩的
    https://www.lagou.com/gongsi/0-2-0-0
    这个页面点进去进入公司的页面 爬虫地址信息 有时候报验证码,求指教
    headers = {
    "User-Agent": "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; de-DE) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0",
    "X-Requested-With": "XMLHttpRequest", "Referer": "https://www.lagou.com/gongsi/0-1-0-0"
    }
    cookies_str = "user_trace_token=20180909010719-4eb82332-59f2-4979-b7ba-4a96de35eb40; _ga=GA1.2.1153938840.1536426437; LGUID=20180909010720-a5755fe0-b389-11e8-8ccd-525400f775ce; index_location_city=%E5%8C%97%E4%........“

    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
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4322 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 10:12 · PVG 18:12 · LAX 03:12 · JFK 06:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.