michaelhelmick/lassie — pull request #10 by yaph (2013-09-04 20:11:11+00:00)
Title: Fix possible ValueError in convert_to_int caused by values like 1px

When trying to parse http://www.wired.com/wiredscience/2013/09/rim-fire-map-color-scale/ a ValueError was raised in convert_to_img, because the page has image width and height values ending in px.

I changed the function to be more liberal regarding dimension values, by extracting the digits before casting to int. I added a test for this.

Not sure though if the value should be converted to int at all or kept as a string.