A scraper for OGame, built to pull account and universe data out of a game that offers no public API.
The interesting part was never the scraping ā it was the two-stage login. Authentication happens against the Gameforge platform first, which returns a bearer token, and only then can you enumerate the game accounts bound to that player. Working that out meant recording the flow in Chrome DevTools and replaying it by hand until the requests came back clean.
From there it grew into a set of small services, each with a single job and its own test coverage ā starting with universe lookup.
What Iād do differently
request-promise was deprecated within months of my writing this; today it would
be fetch or undici. The credentials in the original post were also inlined
directly in the source ā they should have been environment variables from day
one, and the post has since been corrected to show that.