How do I pass cookies from .cookie document to phantomjs?
phantomjs has a parameter --cookies-file
and I can point it to the cookie. Its format is similar:
[General]
cookies="@Variant(\0\0\0\x7f\0\0\0\x16QList<QNetworkCookie>\0\0\0\0\x1\0\0\0\x2\0\0\0lBAIDUPSID=9C185C46016DC114CB8ECCDE512C768B; expires=Tue, 10-Nov-2082 20:14:15 GMT; domain=.baidu.com; path=/\0\0\0oBAIDUID=9C185C46016DC114CB8ECCDE512C768B:FG=1; expires=Sat, 15-Oct-2044 17:00:09 GMT; domain=.baidu.com; path=/)"
Here I want to know, if I have a cookie string obtained from document.cookie
in a website, how can I pass it to phantomjs --cookies-file
? I'm not sure how to convert the format.
+3
source to share
No one has answered this question yet
See similar questions:
or similar: