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

Nil ref for an invalid node's href's value #147

Closed cameronmccord2 closed 3 years ago

cameronmccord2 commented 3 years ago

We're getting a NoMethodError when the Favicon scraper is trying to get the href attribute from a node. The node exists but not the href attribute.

The url its failing on is: 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