Phantom2JAR
Export PhantomJS' cookies to tough-cookie easily.
You can use the tough-cookie's JAR with others request library.
Install
npm install phantom2jar --save
Usage
Here's a basic example opening a webpage and extracting the created cookies from them.
const phantom2jar = const phantom = { // Initialize phantomjs const instance = await phantom const page = await instance // Do your requests with the page const stackoverflow = await page let jar = await // This will return a though-cookie jar // You can plug it with any other lib that use though-cookie :) // Do whatever you want...}