V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hatcat3
V2EX  ›  问与答

python 抓取动态网页的问题

  •  
  •   hatcat3 · May 11, 2013 · 4163 views
    This topic created in 4745 days ago, the information mentioned may be changed or developed.
    比如这个网页
    http://image.baidu.com/channel#%E6%98%8E%E6%98%9F&%E5%88%98%E8%AF%97%E8%AF%97&0&0
    里面的图片都是通过js动态生成的, 用urllib获取不到里面的图片
    请问类似这种问题有好的解决方案吗?
    6 replies    1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       May 11, 2013   ❤️ 1
    chrome打开network,看实际请求
    这根本就不是解不解决方案的问题,只是你不会罢了

    建议你爬之前先学学怎么写,至少了解下HTML、HTTP协议、JS、AJAX、CSS以及一种服务器语言实现。
    ljbha007
        3
    ljbha007  
       May 11, 2013
    @Livid
    V2EX的gist 问题真的很严重啊
    phuslu
        4
    phuslu  
       May 11, 2013 via iPhone
    可以试下g ho s t . p y
    hatcat3
        5
    hatcat3  
    OP
       May 11, 2013
    @binux 呵呵 如果只是这个倒是可以取得 我想问的是一种通用型的解决方案
    binux
        6
    binux  
       May 11, 2013
    @hatcat3 上浏览器引擎
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   954 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 19:54 · PVG 03:54 · LAX 12:54 · JFK 15:54
    ♥ Do have faith in what you're doing.