Remove unused OCR code
This commit is contained in:
21
demo.py
Normal file
21
demo.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import pymysql
|
||||
import pymysql.cursors
|
||||
from dotenv import dotenv_values
|
||||
from pprint import pprint
|
||||
|
||||
config = dotenv_values(".env")
|
||||
conn = pymysql.connect(host=config['MYSQL_HOST'], user=config['MYSQL_USER'], password=config['MYSQL_PASSWORD'], database=config['MYSQL_NAME'], cursorclass=pymysql.cursors.DictCursor)
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT * FROM web_images WHERE id=1436682 LIMIT 5")
|
||||
|
||||
# 获取查询结果
|
||||
rows = cursor.fetchall()
|
||||
for row in rows:
|
||||
# 格式化打印
|
||||
pprint(row)
|
||||
|
||||
|
||||
|
||||
# 关闭游标和连接
|
||||
cursor.close()
|
||||
conn.close()
|
Reference in New Issue
Block a user