Skip to content

mxfli/node-cookies.txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cookies.txt

TestStatus:Test Status

#README This is a wget cookies.txt formart parser for nodejs.

Convert wget cookies.txt format file into JSON boject.

Working whith http.requst or request module.

##Install npm install cookies.txt

##Usage

var cookie = require('cookies.txt');
cookie.parse('your cookies.txt file path here.', function(jsonCookieObj){
  //your codes here 
  //...
});

Working with request module

var request = require('request');
var cookie = requeire('cookies.txt');

cookie.parse('your cookies.txt file path here.', function(jsonCookieObj){
  //your codes here 
  request.get({
      url:'the http url',
      jar:true, 
      encoding:null, 
      headers:{
        Cookie:cookie.getCookieString('the url')}})
    .pipe(AWritebleStreamInstance);
  //...
});

##License MIT

About

wget cookies.txt formart parser for NodeJS

Resources

Stars

Watchers

Forks

Packages

No packages published