I have a reference to the cookie in js (electron). I have been trying to save the cookie to a file using tough-cookie-file-store (https://www.npmjs.com/package/tough-cookie-file-store), but I can't seem to get it to work.
var cloudscraper = require('cloudscraper');
var jar = cloudscraper.jar();
var cookieStore = require('tough-cookie-file-store');
var j = request.jar(new cookieStore('./cookie.json'));
cloudscraper = cloudscraper.defaults({ jar : j });
cloudscraper here works similarly to request.
Aucun commentaire:
Enregistrer un commentaire