This commit is contained in:
init_mahdi
2025-11-06 17:09:06 +03:30
parent 9731c30c57
commit 2364089442
13 changed files with 984 additions and 1671 deletions
+3 -3
View File
@@ -139,7 +139,7 @@ def repair_law_section_text(cursor, elastic, index_name, dict_changed, file_log)
item = {}
try:
item = elastic.get_doctument(index_name, eid)
item = elastic.get_document(index_name, eid)
# در اینصورت محتوای ماده توسط مجلس تغییر یافته است
text_m = text_normal.normalize_qanon(item['_source']['content'], True).strip().replace(' ', '')
text_m2 = text_normal.normalize_qanon(text, True).strip().replace(' ', '')
@@ -198,7 +198,7 @@ def repair_error_new_section_ts_date( elastic, index_name, dict_changed, file_lo
ts_year = ''
item = {}
try:
item = elastic.get_doctument(index_name, eid_prev)
item = elastic.get_document(index_name, eid_prev)
ts_date = item['_source']['ts_date']
ts_year = item['_source']['ts_year']
sort_date_timestamp = item['_source']['sort_date_timestamp']
@@ -570,7 +570,7 @@ dict_effected_sections, dict_effected_new_sections = extract_all_effecteds(elast
# print(dict_effected_sections)
# try:
# item = elastic.get_doctument("mj_qa_section", "3223423")
# item = elastic.get_document("mj_qa_section", "3223423")
# except Exception as e:
# print(e)
# print(type(e).__name__)