代码之家  ›  专栏  ›  技术社区  ›  yiksanchan

访问站点后如何获取传出的HTTP请求?

web
  •  0
  • yiksanchan  · 技术社区  · 3 年前

    说我来拜访 https://google.com ,我发现它会进行其他几个HTTP调用,获取数据以呈现谷歌主页,包括:

    enter image description here

    有没有办法用服务器端代码获取这些传出的HTTP请求?我希望实现的功能基本上是:

    def fetchOutgoingLinks(url):
        # TODO
    
    fetchOutgoingLinks("https://google.com") == ["https://www.google.com/complete/search?q&cp=0&client=gws-wiz&xssi=t&hl=en-HK&authuser=0&psi=EB5hYtyeKNaXr7wPuumHyAQ.1650531857155&dpr=2", "https://aa.google.com/u/0/_/gog/get?rt=j&sourceid=538", ...]
    

    非常感谢。

    0 回复  |  直到 3 年前