gottfrois / link_thumbnailer

Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview.
MIT License
512 stars 106 forks source link

Add full url path to favicon icon #133

Closed Warrior109 closed 5 years ago

Warrior109 commented 5 years ago

I think it's important to give the full URL to the favicon. Because if the favicon is in the same server with the main website favicon scrapper returns path to us. For example. It was before:

el = LinkThumbnailer.generate('https://www.cornmarket.ie/', attributes: [:favicon])
el.favicon
>>  "/images/favicon/favicon-16x16.png"

It is after:

el = LinkThumbnailer.generate('https://www.cornmarket.ie/', attributes: [:favicon])
el.favicon
>>  "https://www.cornmarket.ie/images/favicon/favicon-16x16.png"
gottfrois commented 5 years ago

Looks good, can you add a fixture spec maybe here? https://github.com/gottfrois/link_thumbnailer/blob/master/spec/fixture_spec.rb

Warrior109 commented 5 years ago

Ok. Thanks. I will do it.

Warrior109 commented 5 years ago

@gottfrois already updated.