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

爬虫获取网页所要加载的资源

  •  
  •   miniliuke · Oct 20, 2017 · 1637 views
    This topic created in 3120 days ago, the information mentioned may be changed or developed.

    我在爬一个网页,但是他的网页加载的 json 的地址,用 js 加密了我没办法模仿......只能用 selenium 模仿访问这个网页,但是我怎么才能知道我在访问这个网页的时候加载的这个 json 的内容,或者得到这个 json 的生成的地址.......

    3 replies    2017-10-20 17:02:43 +08:00
    artandlol
        1
    artandlol  
       Oct 20, 2017 via Android
    wget 整站下载,就一条命令
    miniliuke
        2
    miniliuke  
    OP
       Oct 20, 2017
    @artandlol 但是这个 json 的地址应该是 js 生成的,完全模拟浏览器才可以
    miniliuke
        3
    miniliuke  
    OP
       Oct 20, 2017
    好像找到了解决方案,PhantomJS 里有相关的 api......
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3048 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:07 · PVG 23:07 · LAX 08:07 · JFK 11:07
    ♥ Do have faith in what you're doing.