We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d478fa7 commit c611c08Copy full SHA for c611c08
Get_Content_From_Wikipedia/Get_Content_From_Wikipedia.py
@@ -1,5 +1,6 @@
1
import wikipediaapi
2
3
+
4
def get_wikipedia_content(page_title):
5
wiki_wiki = wikipediaapi.Wikipedia('en')
6
page = wiki_wiki.page(page_title)
@@ -9,12 +10,14 @@ def get_wikipedia_content(page_title):
9
10
else:
11
return f"Page '{page_title}' does not exist on Wikipedia."
12
13
14
def main():
15
page_title = input("Enter the Wikipedia page title: ")
16
content = get_wikipedia_content(page_title)
17
18
print(f"\nContent from Wikipedia for '{page_title}':\n")
19
print(content)
20
21
22
if __name__ == "__main__":
- main()
23
+ main()
0 commit comments