Really glad to see that you carried on with this -- great work!!
Now, the real blocker is accessing the DOM from Python. I haven't looked into the source code deeply, but perhaps Kroll could be of help:
I was able to do the following with Titanium Desktop (which uses it) to access the DOM from Python:
<script type="text/python"> def hello(s): document.getElementById('foo').innerHTML = s </script> <div> Hello <div id="foo">World</div></div> <script>hello("tav")</script>
More relevant links:
Anyways, I'm sure others might have a better idea of integrating Python and the DOM.
Well done again!