Update HTML.py

Moved rate limit checks into a function to remove duplicated code.  Added to-do list.