Heuristic for determining what is likely to be a logo on a website?
I'm building an algorithm for determining logos of websites, given nothing but the root url of the website.
What I'd like 开发者_C百科to do is to provide a collection of likely logos to my client, and allow them to choose the logo of the site.
I'm looking for the best techniques for displaying a logo on a webpage (most common sizes, most common image replacement techniques, etc), so that I can better tailor my algorithm to produce less images (but more likely logos).
Thanks in advance!
This won't be easy, but here are some things you can look for:
- Look for an element with the word 'logo', or the name of the website (on www.google.com search for the word 'google') in the ID, Class or Filename
- If several are found give priority to the first one you find (start from the top)
- If nothing was found, search for h1 elements with background-image properties
- Search for any elements with the word 'logo' as an ID and check for background-image property
精彩评论