• 17条记录
扫一扫加微信 微信扫一扫关注我们 4009151936 在线咨询
require 'net/http' urls = ['http://www.shrszsgs.com/a/anli/', 'http://www.shrszsgs.com/a/anli/yulehuisuo/, 'http://www.shrszsgs.com/a/anli/bieshuhaozhai/', 'http://www.shrszsgs.com/a/anli/gonggongkongjian/', 'http://www.shrszsgs.com/a/anli/zhuangxiushijing/', 'http://www.shrszsgs.com/dingdianbaojie/', 'http://www.shrszsgs.com/ditanqingxi/', 'http://www.shrszsgs.com/kaihuangbaojie/', 'http://www.shrszsgs.com/waiqiangqingxi/', 'http://www.shrszsgs.com/dimianqingxi/'] uri = URI.parse('http://data.zz.baidu.com/urls?site=www.shrszsgs.com&token=uqmaLoYSeM07bifk') req = Net::HTTP::Post.new(uri.request_uri) req.body = urls.join("\n") req.content_type = 'text/plain' res = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(req) } puts res.body