Jump to content

Topic on User talk:Bryan

mwclient accessing page history for dynamic pages

9
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 = mwclient.site('en.wikipedia.org') page = page.site['string') // i am trying to get something equivalent to page.site('%s') % (variable) or page.site(variable) 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)

page.site[variable] ?

173.32.166.188 (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]

173.32.166.188 (talkcontribs)

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

145.94.184.118 (talkcontribs)

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

173.32.166.188 (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.

137.131.59.112 (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?

Brooke

Reply to "mwclient accessing page history for dynamic pages"