Created
January 25, 2017 02:01
-
-
Save sevaa/ac2f62f4e638ccbf3b5ec149d1261d85 to your computer and use it in GitHub Desktop.
CurlCookies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Translating cookie files from PhantomJS format to cURL format and back.
The command line for PhantomJS to cURL conversion goes:
phantomjs --cookies-file=src.txt ExportCurlCookies.js dest.txt
And the command line for other way would go:
phantomjs --cookies-file=dest.txt ImportCurlCookies.js src.txt
The export script overwrites the destination file completely, doesn't add to it. The import script merges the file contents with the existing cookies.
Tested against PhantomJS 1.9.8.