Get cookie from CookieJar by name

后端 未结 4 1856
半阙折子戏
半阙折子戏 2021-01-03 19:46

I know that I can iterate through the cookies in a cookiejar, and this would allow me to find a cookie with a particular name - but does the CookieJar object itself have any

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-03 20:49

    cookielib.CookieJar?

    you can convert jar to a list and process that, e.g. {i.name: i for i in list(j)}

    and btw, j._cookies is actually a dict-dict already, though not completely trivially indexed.

    cookie jar file?

    I thought those were plain text files...

提交回复
热议问题