fast72 commited on
Commit
a918987
·
verified ·
1 Parent(s): 183c098

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +10 -2
index.js CHANGED
@@ -9,10 +9,18 @@ app.get('/get-key', async (req, res) => {
9
  const browser = await chromium.launch({ headless: true });
10
 
11
  const context = await browser.newContext({
12
- //userAgent: 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Mobile Safari/537.36'
 
 
 
 
 
 
 
13
  });
14
 
15
  const page = await context.newPage();
 
16
  await page.goto('https://krnl.cat/checkpointv2/vgetkey', { waitUntil: 'networkidle' });
17
 
18
  const html = await page.content();
@@ -25,5 +33,5 @@ app.get('/get-key', async (req, res) => {
25
  });
26
 
27
  app.listen(PORT, () => {
28
- console.log(`Nyala di http://localhost:${PORT}`);
29
  });
 
9
  const browser = await chromium.launch({ headless: true });
10
 
11
  const context = await browser.newContext({
12
+ locale: 'en-US',
13
+ timezoneId: 'Asia/Jakarta',
14
+ permissions: ['geolocation'],
15
+ geolocation: { latitude: -6.2, longitude: 106.8 },
16
+ viewport: { width: 390, height: 844 },
17
+ deviceScaleFactor: 3,
18
+ isMobile: true,
19
+ hasTouch: true,
20
  });
21
 
22
  const page = await context.newPage();
23
+
24
  await page.goto('https://krnl.cat/checkpointv2/vgetkey', { waitUntil: 'networkidle' });
25
 
26
  const html = await page.content();
 
33
  });
34
 
35
  app.listen(PORT, () => {
36
+ console.log(`Jalan di http://localhost:${PORT}`);
37
  });