mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-12-18 00:00:14 +00:00
d7ca9f5ab2
* 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>
9 lines
352 B
Python
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)
|