请问,在Ruby下的Mechanize模块可以使用vpn代理访问网页吗?
ringa_lee2017-04-22 08:57:57
Of course, you can also use a proxy
http://mechanize.rubyforge.org/EXAMPLES_rdoc.html
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
agent.set_proxy 'localhost', 8000
page = agent.get(ARGV[0])
puts page.body