try:
os.remove(cookies_path)
os.remove(history_path)
print("Cookies and History cleared successfully.")
except Exception as e:
print("Error while clearing cookies and history:", e)
Environment
- OS : windows
- Python : 3
- Script version : 1.8
config.json
# Mendapatkan direktori cookies dan history di Google Chrome
cookies_path = os.path.join(os.environ['LOCALAPPDATA'], r'Google\Chrome\User Data\Default\Cookies')
history_path = os.path.join(os.environ['LOCALAPPDATA'], r'Google\Chrome\User Data\Default\History')
# Menghapus cookies dan history
try:
os.remove(cookies_path)
os.remove(history_path)
print("Cookies and History cleared successfully.")
except Exception as e:
print("Error while clearing cookies and history:", e)
Is there an existing issue for this?
I'm submitting a ...
Description
Mendapatkan direktori cookies dan history di Google Chrome
cookies_path = os.path.join(os.environ['LOCALAPPDATA'], r'Google\Chrome\User Data\Default\Cookies') history_path = os.path.join(os.environ['LOCALAPPDATA'], r'Google\Chrome\User Data\Default\History')
Menghapus cookies dan history
try: os.remove(cookies_path) os.remove(history_path) print("Cookies and History cleared successfully.") except Exception as e: print("Error while clearing cookies and history:", e)
Environment
config.json