|
@@ -343,7 +343,7 @@ def tableToText(soup):
|
|
|
same_value = inner_table[h][0][0]
|
|
|
for w in range(width):
|
|
|
if last_head is not None:
|
|
|
- if inner_table[h-1][w][0]!=fix_value and inner_table[h-1][w][1] == 0:
|
|
|
+ if inner_table[h-1][w][0] != fix_value and inner_table[h-1][w][0] != "" and inner_table[h-1][w][1] == 0:
|
|
|
is_all_key = False
|
|
|
|
|
|
if inner_table[h][w][0]==1:
|
|
@@ -372,9 +372,11 @@ def tableToText(soup):
|
|
|
continue
|
|
|
|
|
|
if is_same_value:
|
|
|
- head_list.append(h)
|
|
|
- last_is_same_value = is_same_value
|
|
|
- continue
|
|
|
+ # 该块只有表头一行不合法
|
|
|
+ if h - head_list[-1] > 1:
|
|
|
+ head_list.append(h)
|
|
|
+ last_is_same_value = is_same_value
|
|
|
+ continue
|
|
|
if not is_all_key:
|
|
|
if not is_same_with_lastHead:
|
|
|
# 该块只有表头一行不合法
|