@@ -79,6 +79,9 @@ def response(resp):
80 # wikipedia article's unique id
80 # wikipedia article's unique id
81 # first valid id is assumed to be the requested article
81 # first valid id is assumed to be the requested article
82+ if 'pages' not in search_result['query']:
82 for article_id in search_result['query']['pages']:
85 for article_id in search_result['query']['pages']:
83 page = search_result['query']['pages'][article_id]
86 page = search_result['query']['pages'][article_id]
84 if int(article_id) > 0:
87 if int(article_id) > 0: