New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dump-cookie

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dump-cookie

Open an empty Chrome browser, dump cookies on termination

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Open an empty Chrome browser, dump cookies on termination.

Motivation

Puppeteer is a savior that save us from boring tasks by enabling us to build web automation tools, however, some sites block Puppeteer's magic wand through libraries like reCAPCHA. To bypass those circumstances, reusing a healthy cookie could be a help sometimes. This program dumps cookies for you.

Installation

git clone https://github.com/reedom/dump-cookie
cd dump-cookie
yarn install

Usage instruction

  • Open a terminal window and invoke the program.
    It will open a new Chrome window with 2 tabs.

    The first tab contains a normal page.
    The second tab is under the control of Puppeteer.

    cd path/to/dump-cookie
    yarn run start
    
  • Move to the first tab, and then visit any web site and do login, etc.

  • Open the same webpage in the second tab, with a hope that it'd load the same cookies with the first tab.

  • Back to the terminal window and press CTRL-C.
    You'll have a cookies' dump string.

  • Save and use it in your program.
    For example:

    const cookies = JSON.parse(DUMPED_COOKIES);
    await page.setCookie(...cookies);
    

License

MIT

Keywords

puppeteer

FAQs

Package last updated on 29 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts