title: How to run window.stop after certain time in puppeteer
body: <p>I want to web scrap a site but the problem with that site is this, content in the site load in 1s but the loader in the navbar kept loading for 30 to 1min so my puppeteer scrapper kept waiting for the loader in the navbar to stop?
  Is there any way to run <code>window.stop()</code> after a certain timeout</p>
  <p><a href="https://github.com/vakhariaheet/fanfic2book_socket/blob/main/src/Web%20Scrappers/Wattpad/Wattpad.ts" rel="nofollow noreferrer">GITHUB</a></p>
  <pre class="lang-js prettyprint-override"><code>    const checkBook = async () =&gt; {
          await page.goto(`https://wattpad.com/story/${bookid}`, {
              waitUntil: 'domcontentloaded',
          });
          const is404 = await page.$('#story-404-wrapper');
          if (is404) {
              socket.emit('error', {
                  message: 'Story not found',
              });
              await browser.close();
              return {
                  error: true,
              };
          }
          storyLastUpdated = await page
              .$eval(
                  '.table-of-contents__last-updated strong',
                  (ele: any) =&gt; ele.textContent,
              )
              .then((date: string) =&gt; getDate(date));
      };
  </code></pre>