rlarcombe/grabbit — pull request #1 by christianarevalo (2014-08-20 15:04:11+00:00)
Title: Uri addressable gem

Hi, I ran into an issue when trying to extract images, specifically I got "bad URI(is not URI?)".

The first link that was causing problems was
http://www.nigerianwatch.com/news/4844-efcc-asks-interpol-to-arrest-oil-magnate-who-fled-to-switzerland-with-politicians-cash-

precisely with the image "/images/stories/mikel fist clenched ii.png" (notice the white spaces). In a first stage I fixed this using URI.encode(image_path) and I made a rspec test.

But the problem came again in the following link
http://www.autoscout24.ch/de/d/audi-a4-kombi-2014-neu?nav=13&slot=474&vehid=2198816

with the image path "http://ad.dc2.adtech.de/adserv/3.0/780/4453480/0/194/ADTECH;loc=300;kvgroup=67;kvmake=audi;kvleasingcalc=33;key=67+audi+16+M+condition_47;grp=[group]"

So finally, I came with the solution to use the gem https://github.com/sporkmonger/addressable that solved both problems with these urls.

PS: This is my first pull-request