# Path: dHydra/core/Vendor.py
# class Vendor:
# 
#     def __init__(
#         self,
#         log_path="log",                     #
#         console_log=True,                   # 屏幕打印日志开关，默认True
#         console_log_level=logging.INFO,     # 屏幕打印日志的级别，默认为INFO
#         critical_log=False,                 # critica单独l写文件日志，默认关闭
#         error_log=True,                     # error级别单独写文件日志，默认开启
#         warning_log=False,                  # warning级别单独写日志，默认关闭
#         info_log=True,                      # info级别单独写日志，默认开启
#         debug_log=False,                    # debug级别日志，默认关闭
#         **kwargs
#     ):
#         self.logger = util.get_logger(
#             log_path=log_path,                     #
#             console_log=console_log,              # 屏幕打印日志开关，默认True
#             console_log_level=console_log_level,  # 屏幕打印日志的级别，默认为INFO
#             critical_log=critical_log,        # critica单独l写文件日志，默认关闭
#             error_log=error_log,             # error级别单独写文件日志，默认开启
#             warning_log=warning_log,         # warning级别单独写日志，默认关闭
#             info_log=info_log,               # info级别单独写日志，默认开启
#             debug_log=debug_log,             # debug级别日志，默认关闭
#             logger_name=self.__class__.__name__,
#         )
# 
# Path: dHydra/core/Functions.py
# def get_vendor(name, vendor_name=None, **kwargs):
#     """
#     get_vendor方法，动态加载vendor类
#     """
#     logger = logging.getLogger('Functions')
#     if vendor_name is None:
#         vendor_name = "V-" + name
#     class_name = name
#     module_name = 'Vendor.' + name + '.' + class_name
#     if os.path.exists(
#         os.getcwd() + "/Vendor/" +
#         name + "/" + class_name + ".py"
#     ):
#         try:
#             instance = getattr(
#                 __import__(module_name, globals(), locals(), [class_name], 0),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     else:
#         try:
#             instance = getattr(
#                 __import__(
#                     "dHydra." + module_name,
#                     globals(),
#                     locals(),
#                     [class_name],
#                     0
#                 ),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     return instance


import dHydra.core.util as util
import pytz
import requests
import asyncio
import pandas
import functools
import threading
import pymongo
import time
        import os
        import hashlib
from dHydra.core.Vendor import Vendor
from dHydra.core.Functions import get_vendor
from .connection import *
from .const import *
from .config import *
from pandas import DataFrame
from datetime import datetime, timedelta
# -*- coding: utf-8 -*-
"""
雪球社区接口类
Created on 03/17/2016
@author: Wen Gu
@contact: emptyset110@gmail.com
"""
# 以下是自动生成的 #
# --- 导入系统配置
# --- 导入自定义配置
# 以上是自动生成的 #



# Path: dHydra/core/Vendor.py
# class Vendor:
# 
#     def __init__(
#         self,
#         log_path="log",                     #
#         console_log=True,                   # 屏幕打印日志开关，默认True
#         console_log_level=logging.INFO,     # 屏幕打印日志的级别，默认为INFO
#         critical_log=False,                 # critica单独l写文件日志，默认关闭
#         error_log=True,                     # error级别单独写文件日志，默认开启
#         warning_log=False,                  # warning级别单独写日志，默认关闭
#         info_log=True,                      # info级别单独写日志，默认开启
#         debug_log=False,                    # debug级别日志，默认关闭
#         **kwargs
#     ):
#         self.logger = util.get_logger(
#             log_path=log_path,                     #
#             console_log=console_log,              # 屏幕打印日志开关，默认True
#             console_log_level=console_log_level,  # 屏幕打印日志的级别，默认为INFO
#             critical_log=critical_log,        # critica单独l写文件日志，默认关闭
#             error_log=error_log,             # error级别单独写文件日志，默认开启
#             warning_log=warning_log,         # warning级别单独写日志，默认关闭
#             info_log=info_log,               # info级别单独写日志，默认开启
#             debug_log=debug_log,             # debug级别日志，默认关闭
#             logger_name=self.__class__.__name__,
#         )
# 
# Path: dHydra/core/Functions.py
# def get_vendor(name, vendor_name=None, **kwargs):
#     """
#     get_vendor方法，动态加载vendor类
#     """
#     logger = logging.getLogger('Functions')
#     if vendor_name is None:
#         vendor_name = "V-" + name
#     class_name = name
#     module_name = 'Vendor.' + name + '.' + class_name
#     if os.path.exists(
#         os.getcwd() + "/Vendor/" +
#         name + "/" + class_name + ".py"
#     ):
#         try:
#             instance = getattr(
#                 __import__(module_name, globals(), locals(), [class_name], 0),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     else:
#         try:
#             instance = getattr(
#                 __import__(
#                     "dHydra." + module_name,
#                     globals(),
#                     locals(),
#                     [class_name],
#                     0
#                 ),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     return instance


# Path: dHydra/Vendor/Xueqiu/Xueqiu.py
import dHydra.core.util as util
import pytz
import requests
import asyncio
import pandas
import functools
import threading
import pymongo
import time
        import os
        import hashlib
from dHydra.core.Vendor import Vendor
from dHydra.core.Functions import get_vendor
from .connection import *
from .const import *
from .config import *
from pandas import DataFrame
from datetime import datetime, timedelta

# -*- coding: utf-8 -*-
"""
雪球社区接口类
Created on 03/17/2016
@author: Wen Gu
@contact: emptyset110@gmail.com
"""
# 以下是自动生成的 #
# --- 导入系统配置
# --- 导入自定义配置
# 以上是自动生成的 #



class Xueqiu(Vendor):