-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bea7fae
commit 83a79d9
Showing
4 changed files
with
1,389 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const puppeteer = require("puppeteer"); | ||
require("dotenv").config(); | ||
|
||
const EMAIL = process.env.EMAIL; | ||
const PSW = process.env.PASSWORD; | ||
|
||
async function yo() { | ||
const browser = await puppeteer.launch({ headless: false }); | ||
const page = await browser.newPage(); | ||
|
||
await page.goto("https://www.leonard-de-vinci.net/"); | ||
|
||
await page.focus("#login"); | ||
await page.keyboard.type(EMAIL); | ||
await page.click("#btn_next"); | ||
|
||
await page.waitForSelector("#passwordInput"); | ||
await page.focus("#passwordInput"); | ||
await page.keyboard.type(PSW); | ||
await page.click("#submitButton"); | ||
|
||
//const cookies = await page.cookies( | ||
// "https://www.leonard-de-vinci.net/?my=edt" | ||
//); | ||
const client = await page.target().createCDPSession(); | ||
const cookies = (await client.send("Network.getAllCookies")).cookies; | ||
console.log("cookies : " + JSON.stringify(cookies)); | ||
} | ||
|
||
yo(); |
Oops, something went wrong.