• 请不要在回答技术问题时复制粘贴 AI 生成的内容
q1q1gg
V2EX  ›  程序员

有什么办法可以实现对网页下所有元素资源所在 ip 监控?

  •  
  •   q1q1gg · Aug 15, 2019 · 1505 views
    This topic created in 2656 days ago, the information mentioned may be changed or developed.

    想写个脚本监控某主页中所有元素的归属 ip 是否正确,用 selenium 试着搞了下没搞定。期望的最终效果类似 ChromeF12 下的 network,能拿到元素 url 及其对应的 ip 即可。

    DsuineGP
    DsuineGP
    Aug 15, 2019
    1
    提供个思路,先拿到页面上资源的 url,用 XMLHttpRequest 请求资源,然后解响应头中的 Remote Address,应该很容易吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1877 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 05:47 · PVG 13:47 · LAX 21:47 · JFK 00:47
    ♥ Do have faith in what you're doing.