diff options
-rwxr-xr-x | wikiquery | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -24,7 +24,11 @@ def main(): sys.exit(0) if args.search: - print wikipedia.search(args.topic) + results = wikipedia.search(args.topic) + if len(results) == 1: + print wikipedia.summary(results[0]) + else: + print results elif args.url: page = wikipedia.page(args.topic) print page.url |