refactor auto import
This commit is contained in:
@@ -56,6 +56,7 @@ def import_law_reg_qanon_to_elastic(cursor):
|
||||
|
||||
|
||||
cursor.execute(query)
|
||||
text_normal = TextNormalizer()
|
||||
|
||||
|
||||
url = BASE_URL + "repo/majles/qaqanon/multi/add"
|
||||
@@ -80,7 +81,7 @@ def import_law_reg_qanon_to_elastic(cursor):
|
||||
# print(row.sectionId)
|
||||
|
||||
|
||||
title = normalYehKe( row.title )
|
||||
title = text_normal.normalize_qanon( row.title )
|
||||
title_type = getTitleType(title)
|
||||
|
||||
eid='qq'+ str(row.Id)
|
||||
@@ -127,7 +128,7 @@ def import_law_reg_qanon_to_elastic(cursor):
|
||||
|
||||
qanon_etebar = ''
|
||||
if row.qanon_etebar :
|
||||
qanon_etebar = row.qanon_etebar
|
||||
qanon_etebar = normalYehKe(row.qanon_etebar)
|
||||
|
||||
|
||||
data={
|
||||
|
||||
Reference in New Issue
Block a user