Skip to content

Uri addressable gem#1

Open
christianarevalo wants to merge 2 commits intorlarcombe:masterfrom
christianarevalo:uri_addressable_gem
Open

Uri addressable gem#1
christianarevalo wants to merge 2 commits intorlarcombe:masterfrom
christianarevalo:uri_addressable_gem

Conversation

@christianarevalo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant