jshemas / openGraphScraper

Node.js scraper service for Open Graph Info and More!
MIT License
643 stars 102 forks source link

how to get the web page icon? #139

Closed sawa-ko closed 2 years ago

sawa-ko commented 2 years ago

I see that there is no option to get the icon of a web page, the so-called favicon, it is in a element in the header and it can be easily obtained with cheerio.

If there is an option please tell me, if not then it would be great if you added that field since docTitle and docDescription already exist, it would be nice to have docFavicon or docIcon.

jshemas commented 2 years ago

Hello. The favicon is not part of the open graph protocol which is why it's missing. But this is a somewhat simple thing to add. You can now get favicon info using open-graph-scraper@4.11.0.

sawa-ko commented 2 years ago

@jshemas nice, thanks!