diff options
-rwxr-xr-x | wikiquery | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -47,7 +47,10 @@ def main(): page = wikipedia.page(topic) display(page.url) else: - display(wikipedia.summary(topic)) + try: + display(wikipedia.summary(topic)) + except wikipedia.exceptions.DisambiguationError as e: + display(e.options) if __name__ == "__main__": main() |