polarpy
V2EX  ›  问与答

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

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

    苦思冥想没有想出好方案

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