2009/7/31 Merlijn van Deen <valhallasw(a)arctus.nl>nl>:
Suggestion: pywikipediabot has good built-in support. My attempt at
building a simple parser (
http://arctus.nl/~valhallasw/pulldom.py) is
about 10 times slower than just using four (much more readable) lines of
code:
import xmlreader
for page in
xmlreader.XmlDump('/home/valhallasw/download/nlwikiquote-20090730-pages-articles.xml').parse():
if '{|' in page.text:
print page.title
I sometimes am surprised of pywikipediabot myself :)
And... xmlreader is the only unit-tested part of pywikipediabot :)
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]