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

Added check for existence of the node's href attribute #148

Closed cameronmccord2 closed 3 years ago

cameronmccord2 commented 3 years ago

resolves #147

NoMethodError: undefined method `value' for nil:NilClass

Offending url: https://vm.tiktok.com/ZMRkMaRGr/

/gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scrapers/default/favicon.rb:28 in href /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scrapers/default/favicon.rb:12 in value /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scrapers/base.rb:29 in call /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scraper.rb:39 in block (2 levels) in call /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scraper.rb:38 in each /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scraper.rb:38 in block in call /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scraper.rb:37 in each /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/scraper.rb:37 in call /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer/page.rb:21 in generate /gems/link_thumbnailer-3.4.0/lib/link_thumbnailer.rb:18 in generate

gottfrois commented 3 years ago

Perfect thank you 👍