If you still need help with this, I made a PowerShell script that removes Google Chrome's profile data.
It stops any chrome processes currently running, then targets:
- Profile # and Default directories
- Local State file
Located in:
%LOCALAPPDATA%\Google\Chrome\User Data
$UserData = "$($env:LOCALAPPDATA)\Google\Chrome\User Data"
$Folders = Get-ChildItem $UserData | Where-Object{ $_.PSIsContainer -and $_.Name -eq "Default" -or $_.Name -like "Profile*"}
$FoldersFullPath = $Folders.FullName
if ($Null -ne (get-process 'chrome' -ErrorAction SilentlyContinue)){
stop-process -ProcessName 'chrome'
Start-Sleep -Seconds 5
}
$FoldersFullPath | ForEach-Object {
if (Test-Path -Path $_){
Remove-Item -Recurse -Path $_
}
}
if (Test-Path -Path "$UserData\Local state"){
Remove-Item -Path "$UserData\Local state"
}
I'm sure you can use this to help you re-create it in Python, in fact, this is a good excuse to learn Python myself.