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