推荐学习书目
› 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
octobersnow
V2EX  ›  Python

requests 如何实现爬虫的单点登陆

  •  
  •   octobersnow · Oct 11, 2017 · 7118 views
    This topic created in 3315 days ago, the information mentioned may be changed or developed.

    我们学校的信息门户和教务系统是分开的(强智科技系统),登陆只能在信息门户登陆,然后进入教务系统自动跳转登陆,如何让爬虫登录到教务系统,两个系统的 cookies 的值并不一样

    9 replies  •  2018-02-17 17:28:08 +08:00
    octobersnow
    octobersnow
    OP
    Oct 11, 2017
    1
    求各位大佬指点一下 谢谢
    ioREQcom
    ioREQcom
    Oct 11, 2017
    2
    未登录情况下,教务系统会通过 302 去门户系统授权拿到 token,教务系统再通过 token 去判断你的登陆身份,从这个角度出发试试吧
    ioREQcom
    ioREQcom
    Oct 11, 2017
    3
    关于上面我讲的,可以看看 yifeng 老师写的 oauth2 的详细介绍
    http://icms.factj.com/article.php?id=2658
    octobersnow
    octobersnow
    OP
    Oct 11, 2017
    4
    @ioREQcom 谢谢 已经完成单点登录 嘿嘿 对照 chrome 一步一步来的 的确是通过 302 拿到授权
    octobersnow
    octobersnow
    OP
    Oct 11, 2017
    5
    由于网上没有找到现成文章 我会把我今天爬虫的单点模拟登陆写成一篇文章
    wcsjtu
    wcsjtu
    Oct 11, 2017
    6
    在浏览器中使用 firebug 看整个流程的发包~然后用代码完整模拟整个过程
    管它什么认证方式~~
    sunwei0325
    sunwei0325
    Oct 12, 2017
    7
    phantomjs+selenium
    linhanqiu
    linhanqiu
    Feb 9, 2018
    8
    您好,请问您写成的文章可以给看一下吗
    octobersnow
    octobersnow
    OP
    Feb 17, 2018
    9
    @linhanqiu 抱歉 好久没有登陆 您可以加我 qq764213885
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1592 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:19 · PVG 22:19 · LAX 06:19 · JFK 09:19
    ♥ Do have faith in what you're doing.