B
beny 18241
Hi,
I know how to print simple website
--
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
--
I wonder how to print output of searcher for example google?
I mean for example print output from google with filled search filed
with 'text'?
I know that there is a simple on
---
require 'net/http'
require 'uri'
res = Net::HTTP.post_form(URI.parse('http://www.google'),
{'search'=>'text', 'max'=>'50'})
puts res.body
---
but it dont work as i wanted.
i get:
/usr/lib/ruby/1.8/net/http.rb:1470:in `initialize': HTTP request path is
empty (ArgumentError)
Please can you help me?
Regards
Beny18241
I know how to print simple website
--
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
--
I wonder how to print output of searcher for example google?
I mean for example print output from google with filled search filed
with 'text'?
I know that there is a simple on
---
require 'net/http'
require 'uri'
res = Net::HTTP.post_form(URI.parse('http://www.google'),
{'search'=>'text', 'max'=>'50'})
puts res.body
---
but it dont work as i wanted.
i get:
/usr/lib/ruby/1.8/net/http.rb:1470:in `initialize': HTTP request path is
empty (ArgumentError)
Please can you help me?
Regards
Beny18241