def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANN_EAST_MONEY
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     log_dir = cons.TASK_LOG_PATH
     if not os.path.isdir(log_dir):
         try:
             os.makedirs(log_dir)
         except:
             pass
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("Real time ann's log create success.")
 def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANN_EAST_MONEY
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     self.yesterday = sys.argv[1]
     self.page_num = 0
     self.report_dir = cons.RESEARCH_REPORT_PATH
     if not os.path.exists(self.report_dir):
         os.mkdir(self.report_dir)
     log_dir = cons.TASK_LOG_PATH
     if not os.path.isdir(log_dir):
         os.makedirs(log_dir)
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("Sina report's log create success.")
Exemple #3
0
 def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANN_EAST_MONEY
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     self.today = sys.argv[1]
     self.page_num = 0
     # self.yesterday = '2017-08-26'
     log_dir = cons.TASK_LOG_PATH
     if not os.path.isdir(log_dir):
         try:
             os.makedirs(log_dir)
         except:
             pass
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("Today is {}.".format(self.today))
 def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANN_EAST_MONEY
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     # self.today = (datetime.datetime.now()).strftime("%Y-%m-%d")
     self.today = sys.argv[1]
     self.page_num = 0
     self.report_dir = cons.RESEARCH_REPORT_PATH
     if not os.path.exists(self.report_dir):
         os.mkdir(self.report_dir)
     log_dir = cons.TASK_LOG_PATH
     if not os.path.isdir(log_dir):
         os.makedirs(log_dir)
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("Download ann of east money's log create success.")
 def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANNOUNCEMENT
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     date_today = datetime.datetime.now().date()
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     log_dir = cons.TASK_LOG_PATH
     self.today = date_today.strftime("%Y%m%d")
     # log_dir += '/' + self.yesterday
     if not os.path.isdir(log_dir):
         try:
             os.makedirs(log_dir)
         except:
             pass
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("ScrapyAnnouncement's log create success.")
 def __init__(self, log_lev='INFO'):
     self.URL = cons.RAW_URL_OF_ANN_EAST_MONEY
     self.URL_Net = urlparse(self.URL).netloc
     self.URL_SCHEME = urlparse(self.URL).scheme
     self.log_name = os.path.splitext(os.path.split(sys.argv[0])[1])[0]
     self.today = sys.argv[1]
     self.an_pdf_data_path = os.path.join(cons.ANN_EAST_MONEY_DOWNLOADED,
                                          self.today)
     if not os.path.exists(self.an_pdf_data_path):
         os.mkdir(self.an_pdf_data_path)
     log_dir = cons.TASK_LOG_PATH
     if not os.path.isdir(log_dir):
         try:
             os.makedirs(log_dir)
         except:
             pass
     my_log = JobLogging(self.log_name, log_dir)
     my_log.set_level(log_lev)
     self.log = my_log.get_logger()
     self.log.info("Download ann of east money's log create success.")