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
4gShell
V2EX  ›  Python

求一个模拟新浪登录爬虫

  •  
  •   4gShell · 2014-06-05 09:10:23 +08:00 · 4847 次点击
    这是一个创建于 3584 天前的主题,其中的信息可能已经有所发展或是发生改变。
    学习python,求一个模拟新浪登录的爬虫,研究学习。
    11 条回复    2014-07-02 17:12:36 +08:00
    shoumu
        1
    shoumu  
       2014-06-05 09:18:51 +08:00
    很久之前写过一个,但是现在已经不能用了
    RelativeLayout
        2
    RelativeLayout  
       2014-06-05 09:24:34 +08:00   ❤️ 1
    https://github.com/daimajia/social-auth-simulator

    很早的时候自己做了一个,刚才测试了下 还能用。

    得sudo pip install BeautifulSoup4 和 requests. 然后在

    https://github.com/daimajia/social-auth-simulator/blob/master/Weibo/local/test.py

    填上自己的用户名和密码就可以测试了。
    RelativeLayout
        3
    RelativeLayout  
       2014-06-05 09:26:32 +08:00
    因为当时考虑到了很多未来微博可能变化的细节,表单的提取都是动态的,而不是写好的。所以机动性更强一些。
    humiaozuzu
        4
    humiaozuzu  
       2014-06-05 09:32:09 +08:00
    @RelativeLayout 登陆有时会出现验证码
    RelativeLayout
        5
    RelativeLayout  
       2014-06-05 09:37:24 +08:00   ❤️ 1
    @humiaozuzu 我这个貌似可以绕过哦~
    4gShell
        6
    4gShell  
    OP
       2014-06-05 09:39:58 +08:00
    @RelativeLayout 谢谢啦
    youyudehexie
        7
    youyudehexie  
       2014-06-05 10:15:33 +08:00   ❤️ 1
    @humiaozuzu 只要设置号常用登录地区就可以
    airbob
        8
    airbob  
       2014-06-05 10:52:01 +08:00
    @RelativeLayout 谢谢,正好也需要这个
    Ansen
        9
    Ansen  
       2014-06-05 11:07:39 +08:00
    pyshift
        10
    pyshift  
       2014-06-05 11:54:42 +08:00
    推荐爬cn端,压力小。时间间隔设置出去。而且明文不用转码,com端是unicode编码的。标签自己分析一下,正则一下就好了。自己刚做完一个新浪的爬虫=。=应付毕设。
    linsk
        11
    linsk  
       2014-07-02 17:12:36 +08:00
    @pyshift 有没有办法爬一个账户的微信好友圈里的内容?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   963 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:43 · PVG 04:43 · LAX 13:43 · JFK 16:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.