LC
09/09/2024, 2:40 AMpuppeteer
because I found the addInterceptRequestHandler
in the docs, but I could use Playwright if it's easier. Can someone here help me to understand what I'm doing wrong? Here is a gist with the code I'm using: https://gist.github.com/lcnogueira/d1822287d718731a7f4a36f05d1292fc (I can't post it here, otherwise my message becomes too long)Hall
09/09/2024, 2:40 AMLC
09/10/2024, 4:25 PMconst data = await page.$eval('html', (html) => {
const script = Array.from(html.querySelectorAll('script')).find(script => script.src.includes('my-script-name.js'));
const field = providerScript?.getAttribute('attribute-name');;
return field;
});
However, I'd still be interested to know how I can pause my crawling until all the external requests are made so that I can handle another need I have.Alexey Udovydchenko
09/11/2024, 2:51 AMpreNavigationHooks
and add relevant "waitfor" in handle function