I am trying to read and load a cookies.txt file saved on my local computer in Python.
But I keep getting the following error:
TypeError: a bytes-like object is required, not 'str'
My code looks as follow:
with open ("cookies.txt", "r") as text_file:
yup = requests.utils.cookiejar_from_dict(pickle.load(text_file))
cookies = yup
What am I doing wrong or what am I missing here? I downloaded the cookies with the cookies.txt extension.