@ejazullah/smart-browser-automation
Version:
A smart AI-driven browser automation library and REST API server using MCP (Model Context Protocol) and LangChain for multi-step task execution. Includes both programmatic library usage and HTTP API server for remote automation.
23 lines (22 loc) • 425 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.saveCookiesFromHeader = saveCookiesFromHeader;
function saveCookiesFromHeader({
cookieOptions,
cookies,
requestUrl
}) {
const {
jar
} = cookieOptions;
for (const cookie of [cookies].flat()) {
if (cookie == null) {
continue;
}
jar.setCookieSync(cookie, requestUrl, {
ignoreError: true
});
}
}