def get(job_info,**comm_kwargs): #print comm_kwargs comm = Comm(job_info, **comm_kwargs) comm.set_attr(log_file_name="BCCard_crawl_profile.log") for t in range(DEFAULT_RETRY_COUNT): comm = get_attempt(comm) try: if comm.driver: comm.driver.quit() comm.driver = None except: comm.add_err("ERROR_RETRIABLE_problem_in_closing_webdriver", tb_msg=traceback.format_exc(), SC=True) return comm if comm.last_e_msg == "OK": comm.logger.error(">>>ALL PROCESS IS DONE") return comm elif "ERROR_DO_NOT_RETRY" in comm.last_e_msg: return comm else: time.sleep(5) comm.add_err("ERROR_DO_NOT_RETRY_retry_count_exceed") return comm
def get(job_info, **comm_kwargs): comm = Comm(job_info, **comm_kwargs) comm.set_attr(url="https://spib.wooribank.com/pib/Dream?withyou=CMLGN0001", log_file_name="Woori_crawl_profile.log") for t in range(DEFAULT_RETRY_COUNT): comm = get_attempt(comm) if comm.last_e_msg == "OK": comm.logger.error(">>>ALL PROCESS IS DONE") return comm elif "ERROR_DO_NOT_RETRY" in comm.last_e_msg: return comm else: time.sleep(5) comm.add_err("ERROR_DO_NOT_RETRY_retry_count_exceed") return comm