-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
30 lines (26 loc) · 760 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { Client, LocalAuth, base64ToPNG } = require("./index");
const client = new Client({
authStrategy: new LocalAuth(),
puppeteer: {
headless: true,
args: [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--disable-accelerated-2d-canvas",
"--no-first-run",
"--no-zygote",
"--single-process", // <- this one doesn't works in Windows
"--disable-gpu",
],
},
});
client.on("qr", (qr) => {
// Generate and scan this code with your phone
console.log("QR RECEIVED", qr);
base64ToPNG(qr);
});
client.initialize();
client.order(
"https://shopee.co.id/Strap-MiBand-3-4-5-6-Strap-Silicone-Tali-Pengganti-Xiaomi-Mi-Band-3-4-5-6-Warna-Polos-i.346000752.13217782061"
);