browser_cookie3 icon indicating copy to clipboard operation
browser_cookie3 copied to clipboard

[Question] how do you traverse or search through the cookies and also where is it tmp cookies located

Open JunkyardCat opened this issue 4 years ago • 1 comments

hi so may i ask how do you traverse through the cookies retrieved by this code and also i read that this creates a temp file to avoid lockout. where is this file so i can check if it is already deleted after i get my the things i want in my cookies

I just want to be able to get the 2 things inside the cookie but unsure what is best way to do this

JunkyardCat avatar May 15 '21 05:05 JunkyardCat

you can do this:

try:
    cookies = browser_cookie3.chromium(domain_name='xxx.com')
    for cookie in cookies:
        if cookie.name == 'xxxx':
            print(cookies) # the full cookie
            print("\n" + cookie.value) # whatever is under xxxx
except:
    pass

that's what I use <3 sorry that it took 8 months for someone to finally respond to you xd

yes-0001 avatar Jan 29 '23 16:01 yes-0001