12345678910111213141516171819 |
- """
- @author: luojunhui
- """
- import pymysql
- connection = pymysql.connect(
- host='rm-bp1159bu17li9hi94.mysql.rds.aliyuncs.com',
- port=3306,
- user='crawler',
- password='crawler123456@',
- db='piaoquan-crawler',
- charset='utf8mb4'
- )
- sql = "select accountName, updateTime from official_articles where ghId = '' order by updateTime DESC;"
- cursor = connection.cursor()
- cursor.execute(sql)
- response = cursor.fetchall()
- print(response[0])
|