import pymysql from sqlalchemy import create_engine # 线上数据库连接字符串 # db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("readonly", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot") # 测试数据库连接字符串 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("hcst", "hcst@2020", "139.186.151.174", 3306, "jeecg-boot") engine = create_engine(db_con_str, connect_args={'charset': 'utf8'}) # 创建计划url create_campaign_url = "http://192.168.1.8:8080/jeecg-boot/kuaishou/create/campaignCreate" # 获取上新视频url get_new_video_url = "http://192.168.1.8:8080/jeecg-boot/kuaishou/material/getNewVideoList" # 获取历史视频url get_history_video_url = "http://192.168.1.8:8080/jeecg-boot/kuaishou/material/getHistoryVideoList" # 创建组和创意url create_group_and_creative_url = "" # import MySQLdb # if __name__ == '__main__': # connect = MySQLdb.connect(host="localhost", port=3306, # user="xxx", passwd="xxx", db='xxx', charset='utf8') # # cursor = connect.cursor() # # cursor.execute(""" # UPDATE tblTableName # SET Year=%s, Month=%s, Day=%s, Hour=%s, Minute=%s # WHERE Server=%s # """, (Year, Month, Day, Hour, Minute, ServerID)) # # connect.commit() # connect.close()