一段RUBY的脚本,分析姓名的分数,本来没甚么难的,就是ruby1.91的编码问题,导致一堆问题。
摘要:
require 'net/http' require 'iconv'http = Net::HTTP.new("www.1518.com",80) resp, data = http.get("/s?st=2&word1=韩&word2=乐萱&Submit=%BF%AA%CA%BC%B2%E2%CB%E3") aa = Iconv.conv("utf-8//IGNORE","gbk",data)a = /<div class="njfen&qu 阅读全文
posted @ 2011-05-30 22:24 ohmyjava 阅读(150) 评论(0) 推荐(0) 编辑