def connect(self): 
        try:
            self.connection = pymongo.Connection(self.host, self.port)
            self.db = self.connection[self.name]
        except AutoReconnect:
            raise DatabaseException("It's not possible connect to the database")
def runSpider(self, lstSubcommand=None):
        strSubcommand = lstSubcommand[0]
        strArg1 = None
        if len(lstSubcommand) == 2:
            strArg1 = lstSubcommand[1]
        self.initDriver() #init selenium driver
        self.dicSubCommandHandler[strSubcommand](strArg1)
        self.quitDriver() #quit selenium driver