簡體   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