Skip to content

Commit f356b51

Browse files
authored
Merge pull request larymak#39 from KanakamSasikalyan/main
wikipedia
2 parents 121ae0f + 0bce156 commit f356b51

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

wikipedia/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Wikipedia
2+
![image](https://user-images.githubusercontent.com/67740644/124870233-fe2d1300-dfdf-11eb-889e-8e831fd0cb7a.png)
3+
4+
## Project description
5+
Wikipedia is a Python library that makes it easy to access and parse data from Wikipedia.<br />
6+
Search Wikipedia, get article summaries, get data like links and images from a page, and more.<br />
7+
Wikipedia wraps the MediaWiki API so you can focus on using Wikipedia data, not getting it.<br />
8+
9+
## Installation
10+
To install Wikipedia, simply run:<br /><br />
11+
`$ pip install wikipedia
12+
13+
## Documentation
14+
* [Read the docs Here:](https://wikipedia.readthedocs.org/en/latest/.)
15+
16+
## License
17+
MIT licensed. See the *[License](https://github.com/goldsmith/Wikipedia/blob/master/LICENSE) file for full details.
18+
19+
## Hello wiki
20+
🤔🤗🤔🤗🤔

wikipedia/lang.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import wikipedia
2+
wikipedia.set_lang("fr")
3+
print(wikipedia.summary("Facebook", sentences=1))
4+
5+
# output :
6+
# Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes.

wikipedia/wiki1.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import wikipedia
2+
print wikipedia.summary("Wikipedia")
3+
# Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited,
4+
#multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...

wikipedia/wiki2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import wikipedia
2+
print(wikipedia.search("Barack"))
3+
4+
# output :
5+
#[u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama', u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, 2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama']

wikipedia/wiki3.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import wikipedia
2+
ny = wikipedia.page("New York")
3+
print(ny.title)
4+
print(ny.url)
5+
print(ny.content)
6+
print(ny.links[0])
7+
# output : u'New York'
8+
# u'http://en.wikipedia.org/wiki/New_York'
9+
# u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'...
10+
# u'1790 United States Census'

0 commit comments

Comments
 (0)