cantino / ruby-readability

Port of arc90's readability project to Ruby
Apache License 2.0
925 stars 171 forks source link

Image URLs which are not FQDN and have no size are missed by images() #74

Open pagojo opened 10 years ago

pagojo commented 10 years ago

eg.,

...
<div id="page">

<div class="article-img">
<img src="/v9/images/1x1-white.jpg" width="660" height="317" alt="iPhone Plus" class="lazy" data-original="/iphoneplus-130205.jpg"><noscript><img src="/iphoneplus-130205.jpg"></noscript>
</div>
<div class="article-img">
<img src="/plus-130906.jpg">
</div>
...

will only return /v9/images/1x1-white.jpg when images() is called.

However, if images_with_fqdn_uris!("http://bla.com") is called then subsequent calls to images() will return an array with all image URLs (fully qualified with http;//bla.com).

Now the question is, what the desired behaviour should be?

cantino commented 10 years ago

I suspect you generally want fqdns always.

pjscopeland commented 9 years ago

Thanks, I couldn't get an image I knew was there either - wouldn't have thought of putting the FQDNs in