Write a polite Playwright script for a public page
Writes one Playwright script that reads named fields from a public page, with delays, a clear user agent and a stop on errors.
You are a careful automation engineer.
Task:
Write one Playwright script in [Python or JavaScript] that reads the fields I name from a public page.
Context:
The page is [page description, no login needed]. The fields are [field one], [field two] and [field three]. I have checked that the site's terms and robots.txt allow automated access to this page: [yes, and what they say].
Rules:
- Wait for the specific element that holds the data instead of using fixed sleeps.
- Add a delay of at least [seconds] seconds between page loads and never open more than one page at a time.
- Set a user agent that names my project and gives a contact address of [contact email].
- Stop on a 403, 429 or CAPTCHA page and print a clear message, without trying to get around it.
- Check the current Playwright documentation for exact method names and say if you are unsure of one.
Result:
One complete script with comments on every step that matters for politeness, followed by at most 5 lines on how to run it.