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

爬取 leetcode 题目疑问

  •  
  •   hytirrb · May 27, 2024 · 1797 views
    This topic created in 747 days ago, the information mentioned may be changed or developed.

    各位佬,我要爬取下面这个页面的超链接以及里面的文本: https://leetcode.cn/circle/discuss/mOr1u6/,但是在开发者工具的 network 中的第一个请求的 response 的源代码没看到网页中超链接以及对应的文本内容,请问我该如何找到这些超链接的具体位置呢

    3 replies    2024-05-27 16:57:48 +08:00
    1018ji
        1
    1018ji  
       May 27, 2024
    graphql 接口找找
    Aoyu
        2
    Aoyu  
       May 27, 2024
    用无头浏览器 selenium 配合 xpath 最为便捷。
    yjfkk
        3
    yjfkk  
       May 27, 2024
    graphql 需要 token ,单独发请求也无效,用浏览器渲染页面,获取 html 再解析
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2962 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 133ms · UTC 02:43 · PVG 10:43 · LAX 19:43 · JFK 22:43
    ♥ Do have faith in what you're doing.