def extract_cgnr(province, html, text, lines, table_line, table): if '采购' in text: texts = ['采购目录', '名称'] res = get_data_from_table2(table, texts) if res: res = ','.join(res) else: res = '' return res
def extract_company(province, html, text, lines, table_line, table): text_list = ['中标候选人', '单位名称'] res = get_data_from_table2(table, text_list) if not res: try: res = re.findall('中标候选人.*?投标人名称:(.*?)(\s|()', text, re.S)[0][0] except: pass if not res: r = get_value_by_split_maohao(lines, '第一中标') if r: res.append(r) r = get_value_by_split_maohao(lines, '第二中标') if r: res.append(r) r = get_value_by_split_maohao(lines, '第三中标') if r: res.append(r) return res
def ln_jyw_zbhxr(province, html, text, lines, table_line, table): res = {} # res['xmmc'] = get_value_by_next_td(html, '工程名称') res['type'] = get_value_by_next_td(html, '工程类别') res['xmbh'] = get_value_by_next_td(html, '编号') res['zbr'] = get_value_by_next_td(html, '建设单位') res['gsmc'] = get_data_from_table(table, '单位名称') # jhgq = get_data_from_table(table, '工期') # if not jhgq: # jhgq = None # res['jhgq'] = jhgq res['tbbj'] = get_data_from_table(table, '报价') res['name'] = get_data_from_table(table, '项目负责人') text_list = ['注册资格', '证书'] res['zsmc'] = get_data_from_table2(table, text_list) res['zsbh'] = get_data_from_table(table, '证书编号') gsq_start = get_value_by_next_td(html, '公示开始时间') gsq_end = get_value_by_next_td(html, '公示截止时间') if not gsq_end: gsq_end = get_value_by_next_td(html, '公示结束时间') res['gsq'] = gsq_start + '-' + gsq_end return res
def extract_jsfzr(province, html, text, lines, table_line, table): texts = ['技术负责人'] res = get_data_from_table2(table, texts) return res
def extract_zsmc(province, html, text, lines, table_line, table): res = None text_list = ['注册资格', '证书'] res = get_data_from_table2(table, text_list) return res