Reaperxxxx commited on
Commit
123cb63
ยท
verified ยท
1 Parent(s): 3499ade

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +6 -6
app.js CHANGED
@@ -11,7 +11,7 @@ puppeteer.use(StealthPlugin());
11
  const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
12
 
13
  // Random delay to appear more human-like
14
- const randomWait = (min, max) => wait(Math.floor(Math.random() * (max - min + 1)) + min));
15
 
16
  // Function to upload image to catbox.moe
17
  async function uploadToCatbox(filePath) {
@@ -267,7 +267,7 @@ function loadCookies(cookieFilePath) {
267
  // Take initial screenshot
268
  console.log('\n๐Ÿ“ธ Taking initial screenshot...');
269
  await page.screenshot({
270
- path: '/mnt/user-data/outputs/betking-initial.png',
271
  fullPage: true
272
  });
273
 
@@ -337,7 +337,7 @@ function loadCookies(cookieFilePath) {
337
 
338
  console.log('\n๐Ÿ“ธ Taking final screenshot...');
339
  await page.screenshot({
340
- path: '/mnt/user-data/outputs/betking-final.png',
341
  fullPage: true
342
  });
343
  console.log('โœ“ Screenshot saved to betking-final.png');
@@ -345,7 +345,7 @@ function loadCookies(cookieFilePath) {
345
  // Upload screenshot to catbox
346
  console.log('\n๐Ÿ“ค Uploading screenshot to Catbox...');
347
  try {
348
- const catboxUrl = await uploadToCatbox('/mnt/user-data/outputs/betking-final.png');
349
  console.log('โœ“ Upload successful!');
350
  console.log('\n๐Ÿ”— Download link:');
351
  console.log(catboxUrl);
@@ -353,7 +353,7 @@ function loadCookies(cookieFilePath) {
353
  console.log(catboxUrl);
354
  } catch (uploadError) {
355
  console.error('โŒ Failed to upload to Catbox:', uploadError.message);
356
- console.log('Screenshot is still saved locally at: /mnt/user-data/outputs/betking-final.png');
357
  }
358
 
359
  } catch (error) {
@@ -362,7 +362,7 @@ function loadCookies(cookieFilePath) {
362
 
363
  try {
364
  await page.screenshot({
365
- path: '/mnt/user-data/outputs/betking-error.png',
366
  fullPage: true
367
  });
368
  console.log('Error screenshot saved to betking-error.png');
 
11
  const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
12
 
13
  // Random delay to appear more human-like
14
+ const randomWait = (min, max) => wait(Math.floor(Math.random() * (max - min + 1)) + min);
15
 
16
  // Function to upload image to catbox.moe
17
  async function uploadToCatbox(filePath) {
 
267
  // Take initial screenshot
268
  console.log('\n๐Ÿ“ธ Taking initial screenshot...');
269
  await page.screenshot({
270
+ path: './betking-initial.png',
271
  fullPage: true
272
  });
273
 
 
337
 
338
  console.log('\n๐Ÿ“ธ Taking final screenshot...');
339
  await page.screenshot({
340
+ path: './betking-final.png',
341
  fullPage: true
342
  });
343
  console.log('โœ“ Screenshot saved to betking-final.png');
 
345
  // Upload screenshot to catbox
346
  console.log('\n๐Ÿ“ค Uploading screenshot to Catbox...');
347
  try {
348
+ const catboxUrl = await uploadToCatbox('./betking-final.png');
349
  console.log('โœ“ Upload successful!');
350
  console.log('\n๐Ÿ”— Download link:');
351
  console.log(catboxUrl);
 
353
  console.log(catboxUrl);
354
  } catch (uploadError) {
355
  console.error('โŒ Failed to upload to Catbox:', uploadError.message);
356
+ console.log('Screenshot is still saved locally at: ./betking-final.png');
357
  }
358
 
359
  } catch (error) {
 
362
 
363
  try {
364
  await page.screenshot({
365
+ path: './betking-error.png',
366
  fullPage: true
367
  });
368
  console.log('Error screenshot saved to betking-error.png');