nokogiri: Get shortcut icon from a page [closed]
How can I do that?
@smotchkkiss is correct for most cases. By and large, if a website provides an icon, it's where he said it would be. However, it isn't required to be there. The favicon can be specified via link
tags in the document itself. See Wikipedia for more details on how the standards say it should be done.
To use nokogiri, you need to grab the following link element: <link rel="shortcut icon" href="http://sstatic.net/so/favicon.ico">
(this was taken from this site).
精彩评论