#!/usr/bin/env python

#####################

from mangafox import MangaFox
from mangareader import MangaReader
from otakuworks import OtakuWorks

#####################

class SiteParserFactory():
	"""
	Chooses the right subclass function to call.
	"""
	@staticmethod
	def getInstance(options):
		ParserClass = {
			'[mf]' 		: MangaFox,
			'[mr]'	 	: MangaReader,
			'[ow]'	 	: OtakuWorks
			
		}.get(options.site, None)
		
		if not ParserClass:
			raise NotImplementedError( "Site Not Supported" )
		
		return ParserClass(options)
#!/usr/bin/env python

#####################

from mangafox import MangaFox
from mangareader import MangaReader
from otakuworks import OtakuWorks

#####################

class SiteParserFactory():
	"""
	Chooses the right subclass function to call.
	"""
	@staticmethod
	def getInstance(options):
		ParserClass = {
			'[mf]'        : MangaFox,
			'[mr]'        : MangaReader,
			'[ow]'        : OtakuWorks,
			'MangaFox'    : MangaFox,
			'MangaReader' : MangaReader,
			'OtakuWorks'  : OtakuWorks
			
		}.get(options.site, None)
		
		if not ParserClass:
			raise NotImplementedError( "Site Not Supported" )
		
		return ParserClass(options)
Update to restore XML Functionality. It would be confusing for the XML to specify the site in the new format: [mf], [mr], ect. The XML module could covert from the MangaFox to [mf]. However, I believe the XML module should be ignorant and the Factory pattern should do the conversion and return the correct Parser.