try to save cookies

This commit is contained in:
2023-04-04 10:30:16 +02:00
parent ec29772cae
commit 04a3acb5e9
+7
View File
@@ -382,6 +382,13 @@ class CommandorPage {
} else {
if (content.includes(MESSAGE_URL_VALIDATION_FR) || content.includes(MESSAGE_URL_VALIDATION_EN)) {
log("successful");
// save cookies
try {
let cookies = await this.context.cookies()
await fs.writeFileSync(this.contact.mail + '.txt', cookies.join('\n'));
} catch (e) {
console.log(e)
}
await this.push_message_to_queue(PublishType.SUCCESS);
} else if (content.includes(EMPTY_RESPONSE_ERROR)) {
log("EMPTY_RESPONSE_ERROR error received, will quit")