Using DNS
I know this is an old project for you but I was contemplating this same task but my way of approaching it (admittedly with little actual experience here) was going to be using DNS to forward all the ks domains to some php file where I sent back the response I wanted to send instead of whatever Amazon would have returned.
This should basically do the same thing you're doing here with the exception that you're having to re-write files and the only thing my method should require is changing the DNS (which can be done at the router level if need be, but I think some can be edited by selecting "static IP" I don't have that option on mine).
Have you thought of this? Experimented with it? Have any information I don't have on why this wouldn't work?
I was going to try to MITM my kindle and watch the requests it's making but if you have any details on all that (I'm sure a lot of it is in your code, but I'm not skilled enough in Python to know where but if you point me to a direction I can check that), that would also be greatly appreciated.
Thanks!