charlotte-ruby/image_scraper — Issue #2: Image with a blank space
Author: jonathansimmons
Created: 2011-12-25 01:35:37+00:00
State: open

This is a basic html issue but its causing a bad URI error:

url
[code]
http://www.amazon.com/Planet-Two-Disc-Digital-Combo-Blu-ray/dp/B004LWZW4W/ref=sr_1_1?s=movies-tv&ie=UTF8&qid=1324771542&sr=1-1[/code]

error
[code](bad URI(is not URI?): %20http://g-ecx.images-amazon.com/images/G/01/SIMON/IsaacsonWalter._V164348457_.jpg):[/code]

faulty html sample
[code] [/code]

Looks like the scraper is throwing the error when and image has a space and the first character of the source. Which apparently is a common mistake amazon.com makes

I can give you the full trace if that would help but it seems pretty straight forward. I played with a few lines trying to get it to just ignore the image if the first character was blank to no avail. (still new to rails.) Let me know what other information I can get you to help out.