Tim_Mcd
(Tim Mcd)
1
resp = Net::HTTP.get(URI.parse("http:#{img['src']}"))
thats the line that is making this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/common.rb:436:in
`split': bad URI(is not URI?):
(URI::InvalidURIError)
How is it invalid? 
ยทยทยท
--
Posted via http://www.ruby-forum.com/.
Ron_Fox
(Ron Fox)
2
Tim Mcd wrote:
resp = Net::HTTP.get(URI.parse("http:#{img['src']}"))
thats the line that is making this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/common.rb:436:in
`split': bad URI(is not URI?):
http://images.slashdot.org/articles/09/02/03/1620213-1-thumb.png
(URI::InvalidURIError)
How is it invalid? 
What are the contents of img['src']... do they include the leading //'s required to make this a good URI?
ยทยทยท
--
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/common.rb:436:in
`split': bad URI(is not URI?):
http://images.slashdot.org/articles/09/02/03/1620213-1-thumb.png
(URI::InvalidURIError)
How is it invalid? 
Well, according to my irb, it isnt ->
>> URI.parse("http://images.slashdot.org/articles/09/02/03/1620213-1-thumb.png"\)
=> #<URI::HTTP:0xb7ade668 URL:http://images.slashdot.org/articles/09/02/03/1620213-1-thumb.png>
So it must be something about img['src'], you should #inspect it.
ยทยทยท
--
Dominik Honnef
dominikho@gmx.net