Hi everyone, I'm just dabbling in Ruby and making little programs that
help me dive in. However, I'm having some issues around net/http and
open-uri.
In Python, I made an imgur.com image downloader that basically scrapes
the screen for images and then uses urllib/urllib2 to download them.
Works flawlessly.
I've recreated the same program in Ruby, but it only works for about 35%
of the links it comes across. The rest throw the following error when
it comes to actually downloading and saving the file:
These links throwing an error are the same links that download fine and
work fine in Python writing to the same directory structure - and I
can't figure out what is wrong.
Someone suggested using the image_downloader gem, but it didn't work. I
opened up the source for it and its basically doing the same thing I was
doing manually, so it figures it would fail.
This has nothing to do with your download code and everything with
local file permissions.
Kind regards
robert
···
On Sat, Sep 3, 2011 at 11:44 PM, John Bentley <pluhveso@gmail.com> wrote:
Hi everyone, I'm just dabbling in Ruby and making little programs that
help me dive in. However, I'm having some issues around net/http and
open-uri.
In Python, I made an imgur.com image downloader that basically scrapes
the screen for images and then uses urllib/urllib2 to download them.
Works flawlessly.
I've recreated the same program in Ruby, but it only works for about 35%
of the links it comes across. The rest throw the following error when
it comes to actually downloading and saving the file:
These links throwing an error are the same links that download fine and
work fine in Python writing to the same directory structure - and I
can't figure out what is wrong.
Someone suggested using the image_downloader gem, but it didn't work. I
opened up the source for it and its basically doing the same thing I was
doing manually, so it figures it would fail.