This takes longer to load than the last one, but I don't see a way around that doing it the way I'm doing it. I experimented with breaking the page up into lines and just parsing each line, but that didn't have any noticeable effect. I suppose I could build a database of users and pick a random user from there instead of having to load random.bml all of the time. It would be a one-time investment of a few hours, probably, to build up a decent-sized database of users. Of course, I could just traverse friend lists and build up some that way, which would be quicker than loading random.bml a bunch of times.
Update: I realized that, with the way I'm doing it now, I can link to the user associated with the picture. Neat :-)