Topic on User talk:Bryan

Jump to navigation Jump to search

mwclient accessing page history for dynamic pages

Wikipositivist (talkcontribs)

hello bryan i am trying to use mwclient to download full article history for some pages but i can't get mwclient to get the page_title dynamically site ='') page =['string') // i am trying to get something equivalent to'%s') % (variable) or i am also unsure about how to download the full history, for i am only able to retrieve the revisions using page.revisions() is that possible? Wikipositivist 20:43, 29 June 2011 (UTC)

Bryan (talkcontribs)[variable] ? (talkcontribs)

since i have a list of pages to look up (which i obtained from a query), i was actually hoping to get the following working str = cursor.fetchall(query) page = site.Pages[str] (talkcontribs)

correction to above: cursor.fetchall(query) for p in str: site.pages[p] (talkcontribs)

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

in other words, I wanted to know if it is possible to obtain the equivalent of a special export of the text and history of page. page.revisions() gives me the history & I was needing to get the text as well

Also I was wondering if anyone could help me find a way to obtain the 'currentstatus' of articles (currenstatus could be FA, GA, GAN etc.), the currentstatus info seems to be accessible only through the text table

Bryan (talkcontribs)

Not really. You could look at the categories. (talkcontribs)

Hi Bryan, I am working with mwclient as I am updating a bot (ProteinBoxBot). I continue to get the error 'Site' object has no attribute 'conn' and I cannot find where or how to fix this. Can you help me?


Reply to "mwclient accessing page history for dynamic pages"