B
Boris \BXS\ Schulz
Hi,
I would like to save an image from a website, using a ruby script. It
all seemes to work, as the file has the right size and the colors seem
to be OK, but the image itself is nothing but garbage. So it would seem
I used the wrong method to put the image data into my file.
Any help would be appreciated.
greetings, BXS
This is the code that I use:
---
h = Net::HTTP.new('www.sinfest.net', 80, 'myproxy ', 3128)
resp, data = h.get('/comics/sf20031107.gif', nil)
if resp.message == "OK"
f = File.open("sinfest.gif", "w+")
f << data # I guess this is the problem
f.close()
end
I would like to save an image from a website, using a ruby script. It
all seemes to work, as the file has the right size and the colors seem
to be OK, but the image itself is nothing but garbage. So it would seem
I used the wrong method to put the image data into my file.
Any help would be appreciated.
greetings, BXS
This is the code that I use:
---
h = Net::HTTP.new('www.sinfest.net', 80, 'myproxy ', 3128)
resp, data = h.get('/comics/sf20031107.gif', nil)
if resp.message == "OK"
f = File.open("sinfest.gif", "w+")
f << data # I guess this is the problem
f.close()
end