asci

def base = 'http://www.the-asci.org/core/asci'
(1969..2011).each{def m = "${base}/list.php?type=year&key=$it".toURL().text =~ //m.each{def text = "${base}/profile.php?pid=${it[1]}".toURL().text, data = [:]def n = text =~ /(.*?)<\/div>/data.name = n[0][1]n = text =~ /(.*?)<\/div>/def address = []n.each{address << it[1].replaceAll(/<\/?.*?>/,'')}data.contactInfo = address.join('\n')def l = text =~ /Specialties<\/div>(.*?)<\/div>(|\s{3})/, specialties = []if(l)(l[0][1] =~ /(\w*)<\/div>/).each{specialties << it[1]}data.specialties = specialties.join(', ')new Physician(data).save()}
}
 


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部