fix: 修正代理数据提取逻辑以使用字典格式

This commit is contained in:
晓丰 2025-05-17 11:44:03 +08:00
parent d310c8a418
commit 78b793b0df

2
DB.py
View File

@ -109,14 +109,12 @@ class DBVidcon:
self.cursor.execute(sql)
rows = self.cursor.fetchall()
result = {row['rn']: row['parameter'] for row in rows}
self.close()
return result
def get_proxy_parameter(self, rn: str) -> str:
sql = "SELECT parameter FROM proxy_agent WHERE rn = %s LIMIT 1"
self.cursor.execute(sql, (rn,))
result = self.cursor.fetchone()
self.close()
return result[0] if result else None
def rollback_records(self, raws):