繁体   English   中英

如何使用Python显示Google Chrome sqlite3“ cookie”数据库中的主机

[英]How do I display the hosts inside the Google Chrome sqlite3 “cookie” database using Python

我正在使用Python访问“ Cookie” chrome sqlite3 db来检索主机密钥,但是在下面出现错误

import sqlite3
conn = sqlite3.connect(r"C:\Users\tikka\AppData\Local\Google\Chrome\User Data\Default\Cookies")
cursor  = conn.cursor()
cursor.execute("select host_key from cookies")
results = cursor.fetchall()
print results
conn.close()

错误

Traceback (most recent call last):
  File "C:\Python27\cookies.py", line 4, in <module>
    cursor.execute("select host_key from cookies")
DatabaseError: malformed database schema (is_transient) - near "where": syntax error
>>> 

要感谢]连结提供由alecxe能够通过升级sqlite3的版本从3.6.21到3.9.2修复它。 我通过从该站点下载新版本并将dll放入C:\\ Python27 \\ DLLs进行了升级

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM