HerzaJ commited on
Commit
1536cdd
·
verified ·
1 Parent(s): c2ff317

Update plugins/flixer.js

Browse files
Files changed (1) hide show
  1. plugins/flixer.js +3 -3
plugins/flixer.js CHANGED
@@ -18,7 +18,7 @@ const scrapeFlixer = async (searchQuery) => {
18
  const searchUrl = `https://flixer.sh/search?q=${encodeURIComponent(searchQuery)}`;
19
  await page.goto(searchUrl, { waitUntil: 'networkidle0', timeout: 30000 });
20
 
21
- await page.waitForTimeout(2000);
22
 
23
  const searchResults = await page.evaluate(() => {
24
  const results = [];
@@ -46,7 +46,7 @@ const scrapeFlixer = async (searchQuery) => {
46
  const movieUrl = searchResults[0].url;
47
  await page.goto(movieUrl, { waitUntil: 'networkidle0', timeout: 30000 });
48
 
49
- await page.waitForTimeout(3000);
50
 
51
  const servers = await page.evaluate(() => {
52
  const serverList = [];
@@ -87,7 +87,7 @@ const scrapeFlixer = async (searchQuery) => {
87
  if (btn) btn.click();
88
  }, server.name);
89
 
90
- await page.waitForTimeout(5000);
91
 
92
  const currentVideoUrl = await page.evaluate(() => {
93
  const video = document.querySelector('video');
 
18
  const searchUrl = `https://flixer.sh/search?q=${encodeURIComponent(searchQuery)}`;
19
  await page.goto(searchUrl, { waitUntil: 'networkidle0', timeout: 30000 });
20
 
21
+ await new Promise(resolve => setTimeout(resolve, 2000));
22
 
23
  const searchResults = await page.evaluate(() => {
24
  const results = [];
 
46
  const movieUrl = searchResults[0].url;
47
  await page.goto(movieUrl, { waitUntil: 'networkidle0', timeout: 30000 });
48
 
49
+ await new Promise(resolve => setTimeout(resolve, 3000));
50
 
51
  const servers = await page.evaluate(() => {
52
  const serverList = [];
 
87
  if (btn) btn.click();
88
  }, server.name);
89
 
90
+ await new Promise(resolve => setTimeout(resolve, 5000));
91
 
92
  const currentVideoUrl = await page.evaluate(() => {
93
  const video = document.querySelector('video');