https://bugzilla.wikimedia.org/show_bug.cgi?id=55313
--- Comment #9 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- this simple code should be working for this purpose
f = codecs.open(hintfilename, 'r', config.textfile_encoding) R = re.compile(ur'\[\[:?(.*?)\]\]\s+\[\[:?(.*)\]\]') for line in R.findall(f.read()): pageTitle = line[0] hintTitle = line[1]
just make a proper call to
yield wikipedia.Page(site, pageTitle)
and
hints.append(hintTitle)