gpt4 book ai didi

python - python 可以访问谷歌浏览器 webSQL 数据库

转载 作者:行者123 更新时间:2023-12-01 05:50:06 25 4
gpt4 key购买 nike

我有一个本地 Web 客户端,它使用 webSQL 来存储其客户端数据。 (是的,我知道它已被弃用)。

我还有一个 python 脚本,它可以生成报告并立即使用驱动程序从 mdb 文件中获取其数据。

我想知道是否可以通过 python 从 google chrome 的 webSQL 数据库获取我的数据。

我不确定如何从 python 脚本调用 google chrome 中的数据库文件之一,或者是否可能。

任何帮助将不胜感激。

最佳答案

好的,我的同事明白了。

在 Windows 上,您可以访问:

C:\Users\<UserName>\AppData\Local\Google\Chrome\User Data\Default\databases

这里有很多使用 sqlite 的不同网站的数据库。

然后 python 脚本就这么简单:

import sqlite3

conn = sqlite3.connect(<dbFile>)
cursor = conn.cursor()


print "\nHere's a listing of all the records in the table:\n"
for row in cursor.execute("SELECT * FROM <TableName>"):
print row

关于python - python 可以访问谷歌浏览器 webSQL 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14610781/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com