diff --git a/wikiextractor/WikiExtractor.py b/wikiextractor/WikiExtractor.py index 8c66236..6814389 100755 --- a/wikiextractor/WikiExtractor.py +++ b/wikiextractor/WikiExtractor.py @@ -376,8 +376,8 @@ def collect_pages(text): page.append(line) elif tag == '/page': colon = title.find(':') - if (colon < 0 or (title[:colon] in acceptedNamespaces) and id != last_id and - not redirect and not title.startswith(templateNamespace)): + if ((colon < 0 or (title[:colon] in acceptedNamespaces)) and + (id != last_id and not redirect and not title.startswith(templateNamespace))): yield (id, revid, title, page) last_id = id id = ''