5 ms·
90% of the problems solved with puppeteer could be instead solved by replaying a few API requests. Cheaper, less wasteful, faster, in some cases, harder to dete
by internetter 3y ago
90% of the problems solved with puppeteer could be instead solved by replaying a few API requests. Cheaper, less wasteful, faster, in some cases, harder to detect (WAF is rarely deployed on APIs because there are much less heuristics)
- leptons 3y agoAPIs change all the time. I work with plenty of undocumented APIs from a service we actually pay for, and it's a hassle of playing whack-a-mole when something changes without notice.
- internetter 3y agoI do to. Almost every project I've worked on involves an undocumented API. It's still cheaper to devote developer time to reacting to changes than paying to run headless chrome and evade WAFs
- leptons 3y agoBut you can't fully detect the changes without the front-end. When an API changes, so does the official front-end that is interacting with the API. We need to track changes to the HTTP API requests coming from the front-end. You can't detect those changes just by hitting the APIs directly. If the official front-end changes how it sends data to the back-end, we need to change to match it. We also need to detect and react to UI layout changes, and the headless browser is the only real way to do that.