Skip to content

Commit

Permalink
Increase sleep time to retrieve chairs emails
Browse files Browse the repository at this point in the history
The CDN in front of W3C servers seems to have become more picky over rate
limits and rejects requests that are chained too fast. Making the code sleep
4s in between requests seems to solve the issue (but makes the script take
a long long time :().
  • Loading branch information
tidoust committed Oct 2, 2024
1 parent b222d78 commit 4331984
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tools/list-chairs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,20 @@ async function main(format) {
await authenticate(page, W3C_LOGIN, W3C_PASSWORD, url);
chair.email = await page.evaluate(() => {
const el = document.querySelector('.card--user a[href^=mailto]');
return el.textContent.trim();
if (el) {
return el.textContent.trim();
}
else {
return 'no email address found in user page';
}
});
console.warn('Wait 4s to ease load on server...');
await sleep(4000);
console.warn('Wait 4s to ease load on server... done');
}
finally {
page.close();
}
console.warn('Wait 1s to ease load on server...');
await sleep(1000);
console.warn('Wait 1s to ease load on server... done');
}
}
finally {
Expand Down

0 comments on commit 4331984

Please sign in to comment.