如何获取网页中列表的内容

时间:2012-06-11 22:14:01

标签: list webpage

我想从下面的网页中获取列表内容

http://www.alzgene.org/default.asp

像选择基因一样,有一些基因列表,我想从这个列表中获取所有基因,有没有办法做到这一点? 我不确定是否应该联系管理员,因为它自2011年4月起停止更新 感谢

1 个答案:

答案 0 :(得分:1)

如果您知道如何在浏览器控制台中运行脚本,那么JS将为您提供所需的内容:

var options = document.getElementById('genesDDDiv').getElementsByTagName('option'),
    result = "Options: ";
for(var i = 1; i < options.length; i++) {
    result += options[i].innerHTML.replace(/<(\/)?option>/, options[i]) + ",";
}
console.log(result); 

结果: A2M,A2MP,ABCA1,ABCA12,ABCA2,ABCA7,ABCB1,ABCC2,ABCC8,ABCC9,ABCG1,ABCG4,ABCG5,ACAD8,禁毒常务委员会,ACAT2,ACE,ACF,ACHE,ACO2,ACSL4,ACTA2,ADAM10,ADAM12,ADAM17, ADAM9,ADCYAP1R1,ADORA2A,ADORA2B,ADRA1A,ADRA2A,ADRB1,ADRB2,ADRB3,AGER,AGPAT1,AGT,AHR,AHSG,AKAP8,AKT2,ALB,ALDH18A1,ALDH2,ALOX5,ALOX5AP,ANK3,ANXA8,AP3M1,APBA1, APBB1,APBB1IP,APBB2,APEX1,APH1A,APH1B,APOA1,APOA1BP,APOA2,APOA4,APOA5,APOB,APOBEC1,APOBEC2,APOC1,APOC1P1,APOC2,APOC3,APOC4,APOD,APOE,APOE_e2 / 3/4,APOM, APP,AR,ARID4A,ARID5B,ARL5B,ARMS2,ARSB,ART3,ATF7,ATP6V0A4,ATXN1,ATXN8OS,AVPR1A,BACE1,BACE2,BAG3,BAT1,BCAM,BCHE,BCL2,BCL3,BCR,BDNF,BICC1,BIN1, BIRC3,BLMH,C10orf112,C12orf41,C1R,C2,C21orf55,C21orf63,C4A,C4B,CACNB2,CALHM1,CALHM2,CALHM3,CAMK1G,CAMK2G,CAND1,CARD8,CASP3,CASP4,CASP6,CASP8,CAST,CAT,CAV1, CAV3,CBLC,CBS,CCDC134,CC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