JSFiddle - React, Tailwind, and code Playground
JavaScript
loopLabel:
for (let lang of arrayOfLanguages) {
try {
const link = 'https://example.com?hl=&sl=ru&tl=' + lang + '&u=' + URL;
await page.goto(link, { waitUntil: 'networkidle2' });
} catch(err) {
console.log(err);
continue loopLabel;
}
await page.waitFor(10000);
//Page scraping logic;
}