Hello.

You're looking for the Page.latestRevision() function here:

nicd...@host:~/pywikipedia$ python
Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wikipedia
Checked for running processes. 1 processes currently running,
including the current process.
>>> mainpage = wikipedia.Page(wikipedia.getSite('en', 'wikipedia'), 'Main Page')
>>> mainpage.latestRevision()
Getting 1 pages from wikipedia:en...
260905624

But you'll have to code yourself in python to insert it somewhere...
It's sort of a "custom" use.

2009/2/19 Chris Watkins <[email protected]>:
> Is there a way to get the "oldid" value (i.e. which version) for the latest
> version of a page, and insert it using the replace.py command?
>
> It seems like getVersionHistory might have something to do with it, but I
> couldn't find instructions.
>
> Thanks
>
> --
> Chris Watkins (a.k.a. Chriswaterguy)
>
> Appropedia.org - Sharing knowledge to build rich, sustainable lives.
>
> identi.ca/appropedia / twitter.com/appropedia
> blogs.appropedia.org
>
> I like this: five.sentenc.es
>
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
>



-- 
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to