Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
backend
crawler
Commits
bd31b59d
Commit
bd31b59d
authored
Mar 09, 2021
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ad62913c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
ocr_by_img.py
crawler_sys/tools/ocr_by_img.py
+3
-3
func_send_email_with_file.py
maintenance/func_send_email_with_file.py
+1
-1
revise_data_from_es.py
write_data_into_es/revise_data_from_es.py
+10
-10
No files found.
crawler_sys/tools/ocr_by_img.py
View file @
bd31b59d
...
...
@@ -3,10 +3,10 @@
# @Author : litao
from
PIL
import
Image
import
pytesseract
,
os
,
re
import
cv2
import
pytesseract
,
re
#
import cv2
import
argparse
import
cv2
import
os
# construct the argument parse and parse the arguments
ap
=
argparse
.
ArgumentParser
()
...
...
maintenance/func_send_email_with_file.py
View file @
bd31b59d
...
...
@@ -131,7 +131,7 @@ def send_file_email(file_path, data_str, email_group=[],
if
__name__
==
'__main__'
:
send_file_email
(
""
,
''
,
sender
=
"litao@igengmei.com"
,
email_group
=
[
"litao@igengmei.com"
],
email_msg_body_str
=
"test"
,
title_str
=
"test"
,
cc_group
=
[
"litao@igengmei.com"
],
file
=
"
/srv/apps/readelf/shield.text
"
)
send_file_email
(
""
,
''
,
sender
=
"litao@igengmei.com"
,
email_group
=
[
"litao@igengmei.com"
],
email_msg_body_str
=
"test"
,
title_str
=
"test"
,
cc_group
=
[
"litao@igengmei.com"
],
file
=
"
data.csv
"
)
...
...
write_data_into_es/revise_data_from_es.py
View file @
bd31b59d
...
...
@@ -23,10 +23,10 @@ es7 = e7.Elasticsearch(hosts="172.16.52.27", port=9200,http_auth=("elastic","gen
# es7 = e7.Elasticsearch(hosts="172.16.31.17", port=9000)
target_index
=
'gm-dbmw-
lbs
'
target_type
=
'
lbs
'
target_index
=
'gm-dbmw-
suggest-read
'
target_type
=
'
_doc
'
from_index
=
'gm-dbmw-
lbs-rea
d'
from_index
=
'gm-dbmw-
suggest-ol
d'
from_type
=
'_doc'
...
...
@@ -60,13 +60,13 @@ for one_scan in write_into_scan:
count
=
count
+
1
line
=
one_scan
[
'_source'
]
doc_id
=
one_scan
[
'_id'
]
try
:
if
line
[
'is_online'
]
==
1
:
line
[
'is_online'
]
=
True
else
:
line
[
'is_online'
]
=
False
except
:
pass
#
try:
#
if line['is_online'] == 1:
#
line['is_online'] = True
#
else:
#
line['is_online'] = False
#
except:
#
pass
bulk_head
=
'{"index": {"_id":"
%
s"}}'
%
doc_id
data_str
=
json
.
dumps
(
line
,
ensure_ascii
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment