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

抓取 taobao 页面的商品评价,但 html 里没有?

  •  
  •   sean718 · Dec 23, 2014 · 4875 views
    This topic created in 4212 days ago, the information mentioned may be changed or developed.
    “商品评价”需要点一下才出现所有买家的评价内容。
    直接查看网页源代码是没有的。
    例如这个页面:
    http://detail.tmall.com/item.htm?spm=a1z10.1.w5003-4312061082.1.tcCd0A&id=22388452571&rn=838b6fff91da5336ec2903da71c42ce5&scene=taobao_shop
    上面的页面里,“累计评价”只有鼠标点一下才显示里面的内容。
    因此如何得到评价里的内容?
    没有做过web,请问这是动态网页吗?是什么技术?
    4 replies    2014-12-26 14:43:07 +08:00
    taogogo
        1
    taogogo  
       Dec 23, 2014
    phantomjs
    fighter2011
        2
    fighter2011  
       Dec 23, 2014 via Android
    json给的数据
    pc10201
        3
    pc10201  
       Dec 24, 2014
    抓包然后模拟~
    sean718
        4
    sean718  
    OP
       Dec 26, 2014
    各位,我看了一下这个”累计评价“的源码,如下:
    <li>
    <a class="tb-tab-anchor"
    href="javascript:void(0);"
    hidefocus="true"
    data-index="1"
    data-spm-click="gostr=/tbdetail;locaid=d2"
    shortcut-key="g c"
    shortcut-label="查看累计评论"
    shortcut-effect="click">
    累计评论
    <em class="J_ReviewsCount">0</em>
    </a>

    <div class="tb-selected-indicator"></div>
    </li>

    这个链接没有onclick函数,那点击它之后怎么去找它调用的函数呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2722 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 05:57 · PVG 13:57 · LAX 22:57 · JFK 01:57
    ♥ Do have faith in what you're doing.