Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

That 700 lines is almost certainly the part that rebuilds the form, not the part that sends it.

The shape that stays small is to patch a form you were handed rather than construct one. Fetch the edit page inside your session, walk every named input, select and textarea that is already there, change only the description key, and post the whole lot back to the same URL. Ours is well under a hundred lines because it never enumerates fields by hand and never needs to know what itch added last month.

One check worth keeping whatever route you take. Count the keys before you post. A real edit form serialises somewhere around forty five of them. If you ever count about thirteen, you have fetched the page without a session and you are one post away from wiping your price, your tags and your AI disclosure, because that post replaces rather than patches.

Fair warning on the CI half. We run this from inside a logged in browser session, not from a bare script carrying a cookie, so I can't tell you the GitHub Actions version works. The manual paste is a perfectly reasonable place to stop.

(2 edits)

Yeah, that 700 hundred lines I mentioned is basically this:

  •  launch Chromium (without Playwright) pointing at the game's edit page URL and using a custom storage directory. log in, or be logged in already. close window
  • scan that storage directory for relevant cookies, extract them
  • launch Chromium via Playwright, pass the cookies to the context, open the game's edit page URL, find the text editor, switch to HTML mode, paste, click save and open the game's page to verify

I approached it relying on my prior experience building end-to-end browser tests but the issue is that Cloudflare's bot detection on the login page picks up on Playwright, so I wasn't able to get to the login form in a Playwright-controlled window, just the CAPTCHA and it was being stuck in a rejection loop. Hence this wacky (and hacky) two-step process, which would be needlessly complicated to maintain. I'd rather just have an API, so I'm sticking with manual copy/paste until one materializes and binned the Playwright attempt.