polarpy
V2EX  ›  问与答

想问下自动分析网页,获取 xpath 有什么好的方案吗?

  •  
  •   polarpy · Jan 26, 2021 · 2371 views
    This topic created in 2107 days ago, the information mentioned may be changed or developed.

    苦思冥想没有想出好方案

    4 replies  •  2021-01-27 19:29:21 +08:00
    ThisQ
    ThisQ
    Jan 26, 2021
    1
    可能要从 分析网页结构开始。
    monsterxx03
    monsterxx03
    Jan 26, 2021
    2
    chrome 里右键 inspect, 在 console 上对应元素上再右键 Copy -> Copy XPath
    polarpy
    polarpy
    OP
    Jan 27, 2021
    3
    @monsterxx03 这就不是自动分析了
    rickwise
    rickwise
    Jan 27, 2021
    4
    you can try this site: https://selectorgadget.com/
    Chrome add-in is going to help.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3089 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 04:38 · PVG 12:38 · LAX 20:38 · JFK 23:38
    ♥ Do have faith in what you're doing.