this should, in theory, be reasonably robust against Niantic site updates.
still needs some work, but will get something working in the test builds for now...