1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Get cookies from Chrome while it's instance is running on Windows in python

Discussão em 'Python' iniciado por Stack, Novembro 24, 2025.

  1. Stack

    Stack Membro Participativo

    I tried the libraries like browser_cookie and browser_cookie3 and both fail. Browser Cookie3 does not work for the modern chrome and even though browser_cookie DOES after I tweak it's source code a bit to not crash at a cookie it can't decode, it still isn't able to fetch the cookies when an instance is open and is locking the cookie file like it can from firefox for example.

    import browsercookie

    cj = browsercookie.chrome()
    print(cj)


    Fails at .chome(), because of PermissionDenied due to the cookie file being locked.

    I found pycookiecheat as well, but there is no support for windows.

    Is there a way to get cookies from chrome while it's running in an external script? I am aware I could use selenium, but for the client won't install a new chromedriver for every chrome version, so unless selenium has some shippable solution I can not use it.

    Continue reading...

Compartilhe esta Página