zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
py_spider.py
ÎļþÃû´Ó hello.py ÐÞ¸Ä
@@ -109,7 +109,7 @@
        # print('\n')
        after_address.append(a)
    engine = create_engine("mysql+mysqlconnector://root:1234@localhost:3306/fume?charset=utf8")
    engine = create_engine("mysql+pymysql://fumeRemote:feiyu2023@114.215.109.124:3306/fume?charset=utf8")
    con_read = engine.connect()
    df = pd.read_sql('SELECT  b.DI_Name,a.MV_Stat_Code,a.MV_Data_Time,a.MV_Isduplication FROM fd_t_minutevalue AS a JOIN ea_t_device_info AS b ON a.MV_Stat_Code = b.DI_Code',con=con_read)  
@@ -119,8 +119,6 @@
    existing_data = df.values.tolist()  #DateFrame按照行转成list类型,res存放的是设备信息表中的数据
    # print('已处理:',after_address)
    # print('已存在',existing_data)
    # ä¿å­˜é‡å¤å€¼
    duplicate_data=[]
@@ -157,4 +155,4 @@
        return False,max
app.run(debug=True,port=8089)
app.run(debug=False,host='0.0.0.0',port=8089)