V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
ju5t4fun
V2EX  ›  问与答

请问这种结构的的 HTML 怎么用 jsoup 解析?

  •  
  •   ju5t4fun · 2016-02-27 21:40:03 +08:00 · 1398 次点击
    这是一个创建于 2994 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有一个 table 结构是这样的,我想把图中日期部分提取出来,用 jsoup ,该怎么写?
    http://i11.tietuku.com/9150fd3d540ab5a2.png

    2 条回复    2016-02-27 22:00:42 +08:00
    cheneydog
        1
    cheneydog  
       2016-02-27 21:54:15 +08:00   ❤️ 1
    Element eDate = doc.select("div.smallfont").first();
    String sDate = eDate.ownText();
    ju5t4fun
        2
    ju5t4fun  
    OP
       2016-02-27 22:00:42 +08:00
    @cheneydog 谢大神,果然解决了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1257 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:08 · PVG 02:08 · LAX 11:08 · JFK 14:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.