moke
V2EX  ›  编程

爬虫对不规则结构有什么好的解决方案?

  •  
  •   moke · Aug 13, 2019 · 4887 views
    This topic created in 2474 days ago, the information mentioned may be changed or developed.

    爬一个详情页内 table 的数据,这个 table 里面的 html 代码没有 class 和 id 之类的标记,样式全部是内联,tr 个数不固定,但是相差不大,主要是 tr 内的 td 数量不固定,有的两个有的三个,导致没法与数据库字段对应,有什么解决办法吗?

    1 replies    2019-08-13 15:00:12 +08:00
    dingyaguang117
        1
    dingyaguang117  
       Aug 13, 2019
    自己找规律了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3210 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 03:16 · PVG 11:16 · LAX 20:16 · JFK 23:16
    ♥ Do have faith in what you're doing.