Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit be54e99

Browse files
Get_Content_From_Wikipedia added
1 parent 9fca401 commit be54e99

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import wikipediaapi
2+
3+
def get_wikipedia_content(page_title):
4+
wiki_wiki = wikipediaapi.Wikipedia('en')
5+
page = wiki_wiki.page(page_title)
6+
7+
if page.exists():
8+
return page.text
9+
else:
10+
return f"Page '{page_title}' does not exist on Wikipedia."
11+
12+
def main():
13+
page_title = input("Enter the Wikipedia page title: ")
14+
content = get_wikipedia_content(page_title)
15+
16+
print(f"\nContent from Wikipedia for '{page_title}':\n")
17+
print(content)
18+
19+
if __name__ == "__main__":
20+
main()

‎Get_Content_From_Wikipedia/README.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Get_Content_From_Wikipedia
2+
3+
Short description of package/script
4+
5+
- This Script Was simple to setup
6+
- Need import wikipedia-api
7+
8+
9+
## Setup instructions
10+
11+
12+
Just Need to run this command "pip install wikipedia-api
13+
" then run the Get_Content_From_Wikipedia.py file and for running python3 is must be installed!
14+
15+
## Detailed explanation of script, if needed
16+
17+
This Script Is Only for Dirbrute_Script use only!

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /