解决批量获取子域问题

This commit is contained in:
shmilylty
2019-08-14 16:07:30 +08:00
parent f3540ee07b
commit d9c1cb3937
9 changed files with 57 additions and 39 deletions
+5 -2
View File
@@ -13,10 +13,10 @@ from config import logger
class Database(object):
def __init__(self, db_path=None):
self.conn = self.get_connection(db_path)
self.conn = self.get_conn(db_path)
@staticmethod
def get_connection(db_path):
def get_conn(db_path):
"""
获取数据库对象
@@ -205,3 +205,6 @@ class Database(object):
logger.log('ERROR', e)
else:
return rows
def close(self):
self.conn.close()