const jsdom = require("jsdom");

const jsdom = require("jsdom"); const { JSDOM } = jsdom; // Create a new JSDOM instance const cookieJar = new jsdom.CookieJar(undefined, { allowSpecialUseDomain: true, }); // Pass the cookie jar to the jsdom constructor const dom = new JSDOM.fromURL(https://temp-mail.org, { cookieJar }); // Access the document object const document = dom.window.document; // Check if cookies are enabled if (document.cookie) { console.log("Cookies are enabled"); } else { console.log("Cookies are disabled"); } This result is "Cookies are disabled". How can I fix it?
1 Reply
stormy-gold
stormy-gold2y ago
@AR@ BoBo Please move this to the #apify-platform - this is a feature request channel, not a channel to help out with bugs

Did you find this page helpful?