browsercookie
browsercookie copied to clipboard
Cannot find no one of cookies
import browsercookie
import requests
class Cookies:
def __init__(self):
self.able_cookies = None
self.chrome_cookies = None
def cookies_to_value(self, url):
cj = browsercookie.load()
# cookie = [c.value for c in cj]
self.able_cookies = requests.get(url, cookies=cj)
return [i for i in cj]
# -*- coding: utf-8 -*-
from module.cookies import Cookies
cook = Cookies()
url = 'https://github.com'
def bootstrap():
print(cook.cookies_to_value(url=url))
if __name__ == '__main__':
bootstrap()
To help debug this could you provide:
- your browser versions and path to cookie files
- your OS version
Must be linked to https://github.com/richardpenman/browsercookie/pull/20, especially because the message had been posted on 2022-04, the month when Ubuntu 22.04 (moving Firefox from packages to Snaps) had been released.