V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
pythonee
V2EX  ›  Python

python 能不能通过 ie 或 chrome 来抓取渲染好的网页

  •  
  •   pythonee · Feb 13, 2014 · 6233 views
    This topic created in 4458 days ago, the information mentioned may be changed or developed.
    通过urllib2或是requests来get页面,只是抓取了html源码,css渲染效果和ajax调用都没有,所以,我在想是不是可以通过ie或chrome来抓取在浏览器上看到的效果呢
    14 replies    1970-01-01 08:00:00 +08:00
    OhmyCaptain
        1
    OhmyCaptain  
       Feb 13, 2014
    selenium?
    iloahz
        2
    iloahz  
       Feb 13, 2014
    貌似现在能模拟浏览器渲染的就只有1L说这个吧
    txlty
        3
    txlty  
       Feb 13, 2014
    est
        4
    est  
       Feb 13, 2014
    IE可以。win32com
    otakustay
        5
    otakustay  
       Feb 13, 2014
    phantomjs和真chrome的差距还是有点的,真要抓就用selenium吧,除了效率低下外没啥缺点
    manhere
        6
    manhere  
       Feb 13, 2014
    如果是win平台的话,有个命令行版网页截图工具,很好用
    zhouzm
        7
    zhouzm  
       Feb 13, 2014
    cefpython
    simapple
        8
    simapple  
       Feb 13, 2014
    python Qt webkit
    ksc010
        9
    ksc010  
       Feb 13, 2014
    phantomjs + casperjs
    PurpleSun
        10
    PurpleSun  
       Feb 13, 2014
    *nix平台:whhtmltopdf + pdfkit
    josephshen
        11
    josephshen  
       Feb 13, 2014
    http://cutycapt.sourceforge.net/
    然后自己再包装一个python接口就行
    gonjay
        12
    gonjay  
       Feb 13, 2014
    用Chrome插件直接用js来抓取,再通过ajax给自己的数据库存起来?
    pythonee
        13
    pythonee  
    OP
       Feb 25, 2014
    @gonjay 我是想做成daemon定期去抓的,不想起来一个chrome
    keven
        14
    keven  
       Mar 26, 2014
    python应该有相关的库或者可以直接利用的东西吧,我也在抓数据,八爪鱼采集器就是内置了一个浏览器,然后通过浏览器来进行采集的。所以ajax这些肯定是支持的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5963 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 02:18 · PVG 10:18 · LAX 19:18 · JFK 22:18
    ♥ Do have faith in what you're doing.