AndyTheFactory / newspaper4k

📰 Newspaper4k a fork of the beloved Newspaper3k. Extraction of articles, titles, and metadata from news websites.
MIT License
480 stars 49 forks source link

Is it possible to get favicon? #148

Closed AndyTheFactory closed 11 months ago

AndyTheFactory commented 1 year ago

Issue by vitaly-zdanevich Tue Nov 14 04:48:31 2017 Originally opened as https://github.com/codelucas/newspaper/issues/472


I tried article.extractor.get_favicon(article.html) but returned

AttributeError: 'str' object has no attribute 'xpath'

And article.meta_favicon that return ''

AndyTheFactory commented 1 year ago

Comment by awiebe Tue Jun 19 23:53:21 2018


Which is true, html i a string, but the extractor clearly expects a different object, possibly the article object.

AndyTheFactory commented 11 months ago

if meta_favicon is empty, there is none detected by the library

provide examples for non detected