[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pywikipediabot-users
Subject:    Re: [Pywikipedia-l] Async preload
From:       "Dr. Trigon" <dr.trigon () surfeu ! ch>
Date:       2010-09-14 19:14:49
Message-ID: 4C8FC9A9.7090608 () surfeu ! ch
[Download RAW message or body]

Since the API version has problems (thanks xqt for this info), what
about integrating VersionHistory preload in the 'Special:Export' / old
method. As far as I can see it's just a matter of adding 1 line of
code. ;) And it would be very useful for my bot.

Greetings


Am 13.09.2010 18:18, schrieb Dr. Trigon:
> Hello again
>
> A question about pagegenerators.PreloadingGenerator, wikipedia.getall
> and related:
>
> Would it be possible to include VersionHistory preload? On the API side
> the call now used to fetch page contents, returns also at least the most
> recent VersionHistory entry. This would be very useful for me!
>
> (I can write the code needed, if such a feature would be welcome...)
>
> Thanks and greetings!
> DrTrigon
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>


["patch.diff" (text/plain)]

Index: wikipedia.py
===================================================================
--- wikipedia.py	(Revision 8555)
+++ wikipedia.py	(Arbeitskopie)
@@ -3882,6 +3882,7 @@
                     page2._ipedit = ipedit
                     page2._revisionId = revisionId
                     page2._editTime = timestamp
+                    page2._versionhistory = [(revisionId, \
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]  section = \
page2.section()  # Store the content
                     page2._contents = text



_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic