コンテンツにスキップ
#0562
AgentBrowserCron+1

The scraper that repairs its own selectors at 3am

You sell price monitoring. Sixty retail sites, each with a /eval script that reads the product grid. Sites redesign without warning, and on a plain scheduler a redesign means zero rows until an engineer notices.

The nightly cron doesn't run the scripts; it runs an agent that runs the scripts. When site 41 returns zero rows, the agent takes a /screenshot, looks at what the grid became, rewrites the selectors in the /eval script, reruns it, and checks the row count against last night's. Within 5% of yesterday. It saves a memory item: site 41 moved prices into a data attribute: and continues to 42.

Your customers see Tuesday's prices on Tuesday. You see a note on Wednesday.

The site redesign that used to break the product for a week now breaks it for one run.