Such situation: there are 2 Linux server (one running Apache, another with nginx) with a lot of horrible code in unfamiliar languages and framwork. You need to make minor changes.
Tell me, please, hypothetically, instead of long and boring picking the innards, is it possible write a simple script (e.g. in python), which would intercept the html generated by the server, find the lines and replaced others? And is it possible to make this script universal for both servers, i.e. without prior configuration changes? And in what direction to look at?