As part of the huwiki package, I wrote some methods dealing with flagged revisions that work in some wikis. You may find them useful.
https://hu.wikipedia.org/wiki/user:BinBot/huwiki/flaggedrevs.py

--
BinĂ¡ris