I have saved cookies in the database, but when I try to restore them, it's not working because it's only saving the cookies in the database but not retrieving them for restoration.
Yes, i also faced this problem, what i did was if file size was > 100kb then i delete cookies and bot will check if cookies are not present then it will call login function and new cookies file will be saved which will be less than 100 kb.
@Diya.3rif twitter email is a little bit tricky. They have fake url in email.
Anyway I prepared code for you that extracts url param from original url.
It uses split function to exctract query param like this