ver Jan5th
debugged
This commit is contained in:
@@ -5,6 +5,9 @@ import sqlite3
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger("desktopenv.metrics.chrome")
|
||||
|
||||
"""
|
||||
WARNING:
|
||||
1. Functions from this script assume that no account is registered on Chrome, otherwise the default file path needs to be changed.
|
||||
@@ -36,7 +39,7 @@ def get_default_search_engine():
|
||||
'Google')
|
||||
return search_engine
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
logger.error(f"Error: {e}")
|
||||
return "Google"
|
||||
|
||||
|
||||
@@ -61,7 +64,7 @@ def get_cookie_data():
|
||||
|
||||
return cookies
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
logger.error(f"Error: {e}")
|
||||
return None
|
||||
|
||||
|
||||
@@ -85,7 +88,7 @@ def get_bookmarks():
|
||||
return bookmarks
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
logger.error(f"Error: {e}")
|
||||
return None
|
||||
|
||||
|
||||
@@ -117,7 +120,7 @@ def get_extensions_installed_from_shop():
|
||||
manifest = json.load(file)
|
||||
manifests.append(manifest)
|
||||
except json.JSONDecodeError:
|
||||
print(f"Error reading {manifest_path}")
|
||||
logger.error(f"Error reading {manifest_path}")
|
||||
return manifests
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user