Thread:User talk:Bryan/mwclient accessing page history for dynamic pages/reply (4)

The return value of cursor.fetchall is a tuple, so you should use p[0].