code: def parse(self, title, pageid=None):
          
          qry = self.PARSE.substitute(
              WIKI=self.uri,
              ENDPOINT=self.endpoint,
              PAGE=safequote(title) or pageid)
  
          if pageid and not title:
              qry = qry.replace('&page=', '&pageid=').replace('&redirects', '')
  
          if self.variant:
              qry += '&variant=' + self.variant
  
          self.set_status('parse', pageid or title)
  
          return qry
docs: Returns Mediawiki action=parse query string