[go: up one dir, main page]

Skip to content

kokororin/pixiv-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixiv-cookie

npm version

Promise-based pixiv cookie getter (Required Node.js >= 6 )

Features

  • get pixiv.net cookie for further use

Install

npm install --save pixiv-cookie

Usage

const pixivCookie = require('pixiv-cookie');

pixivCookie({
    username: 'your_pixiv_id',
    password: 'your_pixiv_password'
}).then((cookie) => {
    console.log(cookie);
}).catch((error) => {
    console.log(error);
});

Your cookie response is like

[
    {
        "name":"PHPSESSID",
        "value":"13523101_fad2201853c0de2a8a6f8f6b08ab4988",
        "expires":"2017-04-03T04:18:49.000Z",
        "maxAge":2592000,
        "path":"/",
        "domain":".pixiv.net",
        "httpOnly":true
    },
    {
        "name":"device_token",
        "value":"a30f88306e4130b3b953bcbb79bbc893",
        "expires":"2017-04-03T04:18:49.000Z",
        "maxAge":2592000,
        "path":"/",
        "domain":".pixiv.net"
    }
]

And the language of error message is Japanese.

Contribute

Feel free to contribute (PR-s and issues welcomed).

License

MIT license