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
b81bb38b
Commit
b81bb38b
authored
Jan 15, 2021
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
57e5b204
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
crawler_data_id_from_mysql.py
maintenance/temp_file/crawler_data_id_from_mysql.py
+7
-6
No files found.
maintenance/temp_file/crawler_data_id_from_mysql.py
View file @
b81bb38b
...
...
@@ -20,14 +20,15 @@ def con_sql(sql):
db
.
close
()
return
result
sql
=
"select id,question_id,platform from api_answer where platform in (2,0,9)
limit 2
"
res_list
=
[(
"id"
,
"question_id"
,
"platform"
)]
sql
=
"select id,question_id,platform from api_answer where platform in (2,0,9)"
result
=
con_sql
(
sql
)
for
r
in
result
:
print
(
r
)
res_list
.
append
(
r
)
import
pandas
from
crawler.maintenance.func_send_email_with_file
import
send_file_email
data
=
pandas
.
DataFrame
(
res_list
)
data
.
to_excel
(
"./data_file.xlsx"
)
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/meta_base_code/second_demands.csv
"
)
title_str
=
"test"
,
cc_group
=
[
"litao@igengmei.com"
],
file
=
"
./data_file.xlsx
"
)
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