-2

When I tried to obtain cookies from Google using Python, I found that the currently logged in user's NetWork folder was occupied and the administrator did not have permission to access this file.

PermissionError: [Errno 13] Permission denied: 'C:\Users\Username\AppData\Roaming\..\Local\Google\Chrome\User Data\Default\Network\Cookies'
user207421
  • 305,947
  • 44
  • 307
  • 483
  • You don't need to repeat yourself, and please lay off the boldface. It doesn't help. – user207421 Jun 12 '23 at 03:54
  • Sorry, this is my first time using – tong zhao Jun 12 '23 at 04:00
  • What do you mean by "Google"? Google is a company. Are you referring to the Google Chrome browser perchance? – Stephen C Jun 12 '23 at 05:12
  • And what do you mean by "occupied"? – Stephen C Jun 12 '23 at 05:20
  • This sounds like normal Windows behavior. A file that is open for writing its locked by the OS. But you might want to read this: https://stackoverflow.com/questions/57831923/how-do-i-read-chrome-cookies-file – Stephen C Jun 12 '23 at 05:22
  • As I mentioned earlier, when I am using browser_ Cookie3 prompted Permission denied when attempting to obtain a cookie from Chrome – tong zhao Jun 12 '23 at 05:23
  • Actually, you didn't mention it earlier. You said "Google". That's a company ... or a search engine. Anyway, if the file is locked or set so that Admin can't access it, there will be good reasons; e.g. privacy, security and/or preventing the cookie store from being corrupted. (FWIW, the cookie store is an encrypted sqllite3 database ... according to https://stackoverflow.com/questions/57831923/how-do-i-read-chrome-cookies-file) – Stephen C Jun 12 '23 at 05:30
  • Thank you for your answer, but now this method is also ineffective.It will prompt "sqlite3.OperationalError: unable to open database file" – tong zhao Jun 12 '23 at 05:31
  • I expressed it incorrectly, it should be chrome – tong zhao Jun 12 '23 at 05:33
  • For example, when I log in to user 1, the cookie file stored locally in Chrome cannot be read. However, when I close the browser of the logged in user, it can be accessed. However, it was still possible a few days ago, and now it has become inaccessible – tong zhao Jun 12 '23 at 05:41
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 12 '23 at 14:55

1 Answers1

0

I found this on another thread. It works for me. I do have to do this every time I restart the computer though. I'm not sure if there is a way to set it to stay that way.

Unable to Open Cookie File

Mark
  • 11
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 13 '23 at 10:31