<p>Let's say that you want to create a dead simple BlogEditor and, one of your ideas, is to do what Live Writer does and ask only the URL of the persons Blog. How can you detect what type of blog is it?</p>

<p>Basic detection can be done with the URL itself, such as “<a href="http://myblog.blogger.com" rel="nofollow noreferrer">http://myblog.blogger.com</a>” etc. But what if it's self hosted?</p>

<p>I'm mostly interested on how to do this in Java, but this question could be also used as a reference for any other language.</p>

[{'answer_id': 26579, 'author': 'Ross', 'author_id': 2025, 'author_profile': 'https://Stackoverflow.com/users/2025', 'pm_score': 1, 'selected': False, 'text': "<p>Some blogs provide a Generator meta tag - e.g. Wordpress - you could find out if there's any exceptions to this.</p>\n\n<p>You'll have to be careful how you detect it though, Google surprised me with this line:</p>\n\n<pre><code>&lt;meta content='blogger' name='generator'/&gt;\n</code></pre>\n\n<p>Single quotes are blasphemy.</p>\n"}, {'answer_id': 26589, 'author': 'Ryan Farley', 'author_id': 1627, 'author_profile': 'https://Stackoverflow.com/users/1627', 'pm_score': 3, 'selected': True, 'text': '<p>Many (most?) blogs will have a meta tag for "generator" which will list the blog engine. For example a blogger blog will contain the following meta tag:  </p>\n\n<pre><code>&lt;meta name="generator" content="Blogger" /&gt;  \n</code></pre>\n\n<p>My Subtext blog shows the following generator meta tag:  </p>\n\n<pre><code>&lt;meta name="Generator" content="Subtext Version 1.9.5.177" /&gt;  \n</code></pre>\n\n<p>This meta tag would be the first place to look. For blogs that don\'t set this meta tag in the source, you\'d have to resort to looking for patterns to determine the blog type. </p>\n'}, {'answer_id': 26634, 'author': 'Ryan Farley', 'author_id': 1627, 'author_profile': 'https://Stackoverflow.com/users/1627', 'pm_score': 1, 'selected': False, 'text': '<p>To determine other patterns to look for in determining the blogging engine (for those that don\'t have a generator meta tag), you\'d basically just look through the source to determine something specific to that blog type. You\'d also need to compare this across multiple blogs of that type as you want to make sure that it\'s not something specific to the skin or theme in use on the blog only.  </p>\n\n<p>Another thought would be to read the docs of the various common blogging engine to know how to discover the location of it\'s paths to things like MetaWebLog API, etc. IIRC, Live Writer has built-in support for the most common types, the rest are categorized "MetaWebLog API Blog" or something.</p>\n'}]
['https://Stackoverflow.com/questions/26547', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2644/']