Hi all:
I'm trying to get the largest image off a page I parse with Hpricot and am not having any luck. How do I access the width and height attributes of an img tag with it?
Thanks...Chris
Hi all:
I'm trying to get the largest image off a page I parse with Hpricot and am not having any luck. How do I access the width and height attributes of an img tag with it?
Thanks...Chris
Unless it's in the mark-up you won't be able to access the file details through hpricot.
An alternative is to use hpricot to return you all src attributes to the images, then loop through requesting these, you can parse the response as an image and access the properties on these actual image files.