meteor2013
V2EX  ›  PHP

请问怎么去抓一个 wiki 页面上的单词。

  •  1
     
  •   meteor2013 · Mar 7, 2015 · 2709 views
    This topic created in 4278 days ago, the information mentioned may be changed or developed.
    比如这个页面,
    https://en.wikipedia.org/wiki/List_of_medical_symptoms

    怎么去抓上面列出的单词:

    比如:
    abdomen
    back
    chest
    head
    limb - arm, hand, foot or leg
    neck
    。。。

    一直到最后的

    vaginal bleeding in early pregnancy / miscarriage
    vaginal bleeding in late pregnancy
    vaginismus
    4 replies  •  2015-03-07 06:38:03 +08:00
    msg7086
    msg7086
    Mar 7, 2015
    1
    简单说。正则表达式。
    meteor2013
    meteor2013
    OP
    Mar 7, 2015
    2
    能说具体点吗?
    ligyxy
    ligyxy
    Mar 7, 2015
    3
    https://developer.yahoo.com/yql/

    例子就和你的需求很像了
    blacktulip
    blacktulip
    Mar 7, 2015
    4
    $("#mw-content-text ul li a").each(function(index, element) {
    console.log(element.text);
    });

    多了几个少了几个,手动调整一下吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1926 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 02:05 · PVG 10:05 · LAX 18:05 · JFK 21:05
    ♥ Do have faith in what you're doing.