From 4e844d66d66ef57554c2342c6754447104b30fce Mon Sep 17 00:00:00 2001 From: theopolisme Date: Sat, 13 Apr 2013 15:57:31 -0500 Subject: [PATCH] better checker --- australia_roads.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/australia_roads.py b/australia_roads.py index dda85b9..0a147a2 100644 --- a/australia_roads.py +++ b/australia_roads.py @@ -28,7 +28,13 @@ def cats_recursive(category): categories. Almost TOO straightforward. """ + + str = 'Jubilee 150 Walkway' + for item in category: + if item.find(str) != -1: + pass + if "Category" in str(item): cats_recursive(item) else: @@ -40,14 +46,6 @@ def editor(text): work. Requires one parameter, text. """ - # This checks if an article is to be skipped...uses some rudimentary regex. - regexp1 = re.compile(r'Jubilee 150 Walkway') - - if regexp1.search(text) is not None: - print "Article is in skip list." - return text - # End check block - code_compare = mwparserfromhell.parse(text) code = mwparserfromhell.parse(text)