# phantom2jar

> Export PhantomJS cookies to Jar

Latest version **1.0.3** (published 2017-11-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install phantom2jar
pnpm add phantom2jar
yarn add phantom2jar
bun add phantom2jar
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-11-03 |
| First published | 2017-10-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Herlon Aguiar |
| Maintainers | herlon214 |
| Keywords | phantomjs, phantom, cookie, jar |

## Links

- npm: https://www.npmjs.com/package/phantom2jar
- Repository: https://github.com/herlon214/phantom2jar
- Homepage: https://github.com/herlon214/phantom2jar#readme
- Issues: https://github.com/herlon214/phantom2jar/issues
- npm.io page: https://npm.io/package/phantom2jar

## Dependencies (1)

- [aigle](https://npm.io/package/aigle.md) ^1.9.0

## Recent versions

- 1.0.3 (latest) — 2017-11-03
- 1.0.2 — 2017-10-27
- 1.0.1 — 2017-10-27
- 1.0.0 — 2017-10-27

## README

# Phantom2JAR

[![NPM](https://nodei.co/npm/phantom2jar.png)](https://nodei.co/npm/phantom2jar/)

Export PhantomJS' cookies to [tough-cookie](https://www.npmjs.com/package/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.

```javascript
const phantom2jar = require('phantom2jar')
const phantom = require('phantom')

(async function() {
  // Initialize phantomjs
  const instance = await phantom.create()
  const page = await instance.createPage()

  // Do your requests with the page
  const stackoverflow = await page.open('https://stackoverflow.com/')
  let jar = await phantom2jar(instance) // This will return a though-cookie jar

  // You can plug it with any other lib that use though-cookie :)
  
  // Do whatever you want...
})()
```

---
_Source: https://npm.io/package/phantom2jar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
