Beispiel #1
0
 def __init__(self):
     super(BasicMarket, self).__init__(f'../log/{self.__class__.__name__}.log')
     work_space=config_dict('data_path')
     ts_token=config_dict('ts_token')
     self.check_path(work_space)
     ts.set_token(ts_token)
     self.pro = ts.pro_api()
    def __init__(self):
        super(CBDistribution, self).__init__()
        root_path = config_dict('data_path')
        self.IMGAGE_PATH = os.path.join(root_path, f"{self.today}_cb.png")
        self.HMTL_PATH = os.path.join(root_path, f"{self.today}_cb.html")

        self.check_path('data')
Beispiel #3
0
    def __init__(self):
        super(FetchDaily, self).__init__('log/fetch_each_day.log')

        self.path = config_dict('data_path')
        self.check_path(self.path)
        self.df_today_all = pd.DataFrame()
        self.TIMEOUT = 10
        self.DB = DBSelector()
        self.engine = self.DB.get_engine('db_daily', 'qq')
Beispiel #4
0
    def __init__(self, today=None):
        '''
        TODAY 格式 20200701
        :param today:
        '''
        super(GetZDT, self).__init__('log/zdt.log')

        if today:
            self.today = today
        else:
            self.today = time.strftime("%Y%m%d")

        self.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167 Safari/537.36"

        self.path = config_dict('data_path')

        self.zdt_url = 'http://home.flashdata2.jrj.com.cn/limitStatistic/ztForce/' + \
                       self.today + ".js"
        self.zrzt_url = 'http://hqdata.jrj.com.cn/zrztjrbx/limitup.js'

        self.host = "home.flashdata2.jrj.com.cn"
        self.reference = "http://stock.jrj.com.cn/tzzs/zdtwdj/zdforce.shtml"

        self.header_zdt = {
            "User-Agent": self.user_agent,
            "Host": self.host,
            "Referer": self.reference
        }

        self.zdt_indexx = [
            '代码', '名称', '最新价格', '涨跌幅', '封成比', '封流比', '封单金额', '最后一次涨停时间',
            '第一次涨停时间', '打开次数', '振幅', '涨停强度'
        ]

        self.zrzt_indexx = [
            '序号', '代码', '名称', '昨日涨停时间', '最新价格', '今日涨幅', '最大涨幅', '最大跌幅', '是否连板',
            '连续涨停次数', '昨日涨停强度', '今日涨停强度', '是否停牌', '昨天的日期', '昨日涨停价', '今日开盘价格',
            '今日开盘涨幅'
        ]
        self.header_zrzt = {
            "User-Agent": self.user_agent,
            "Host": "hqdata.jrj.com.cn",
            "Referer": "http://stock.jrj.com.cn/tzzs/zrztjrbx.shtml"
        }

        self.DB = DBSelector()
Beispiel #5
0
 def set_proxy_enable(self):
     self.enableProxy = True
     self.proxy_ip = config_dict('proxy_ip')
     self.set_proxy_param(self.proxy_ip)
Beispiel #6
0
 def __init__(self, logpath='log/collect_data.log'):
     super(BasicMarket, self).__init__(logpath)
     work_space = config_dict('data_path')
     self.check_path(work_space)
Beispiel #7
0
 def __init__(self):
     super(PlotYesterdayZT, self).__init__('log/yester_zdt.log')
     self.image_path = config_dict('data_path')
Beispiel #8
0
 def __init__(self):
     super(BasicMarket, self).__init__(f'../log/{self.__class__.__name__}.log')
     work_space=config_dict('data_path')
     self.check_path(work_space)