Awesome-Python-Scripts/Wikipedia-Search/pywikisearch.py
Nissaar d7ca9f5ab2
Wikipedia-Search (#87)
* Create pywikisearch.py

* Create README.md

* Update README.md

* Update README.md

* Update README.md

* Update pywikisearch.py

* Create requirements.txt (#1)

Co-authored-by: Ayush Bhardwaj <classicayush@gmail.com>
2020-03-19 17:51:02 +05:30

9 lines
352 B
Python

import wikipedia
print("Welcome to the app which find an answer to your question from wikipedia")
while True:
ques = input("What would you like to ask Wikipedia?")
wikipedia.set_lang("en") #change "en" to convenient language for example wikipedia.set_lang("es") will set the language to spanish
print wikipedia.summary(ques, sentences=3)