Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
redhongx
2024-07-04 11:02:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c5f5d59013714ca4425a85895af13c7a7a8d59c6
c5f5d590
1 parent
9bebd200
【saveData.py】【query.py】修改数据库连接IP
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
spider/saveData.py
utils/query.py
spider/saveData.py
View file @
c5f5d59
...
...
@@ -2,7 +2,7 @@ import os
from
sqlalchemy
import
create_engine
import
pandas
as
pd
engine
=
create_engine
(
'mysql+pymysql://XiaoXueQi:XiaoXueQi@
10.92.35.13
/Weibo_PublicOpinion_AnalysisSystem?charset=utf8mb4'
)
engine
=
create_engine
(
'mysql+pymysql://XiaoXueQi:XiaoXueQi@
47.92.235.6
/Weibo_PublicOpinion_AnalysisSystem?charset=utf8mb4'
)
def
save_to_sql
():
try
:
...
...
utils/query.py
View file @
c5f5d59
from
pymysql
import
*
conn
=
connect
(
host
=
'
10.92.35.13
'
,
port
=
3306
,
user
=
'XiaoXueQi'
,
password
=
'XiaoXueQi'
,
database
=
'Weibo_PublicOpinion_AnalysisSystem'
)
conn
=
connect
(
host
=
'
47.92.235.6
'
,
port
=
3306
,
user
=
'XiaoXueQi'
,
password
=
'XiaoXueQi'
,
database
=
'Weibo_PublicOpinion_AnalysisSystem'
)
cursor
=
conn
.
cursor
()
def
query
(
sql
,
params
,
type
=
"no_select"
):
params
=
tuple
(
params
)
...
...
Please
register
or
login
to post a comment