Skip to content

Commit cc4053a

Browse files
SUCCESS
1 parent 056cb03 commit cc4053a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

wikipedia/USAGE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# <Usage of the wikipedia>
2+
3+
4+
>>> import wikipedia<br/>
5+
>>> print wikipedia.summary("Wikipedia")<br/>
6+
output : Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited,<br/>
7+
multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...<br/>
8+
9+
>>> wikipedia.search("Barack")<br/>
10+
output : [u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama',<br/>
11+
u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, <br/>
12+
2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama']<br/>
13+
14+
>>> ny = wikipedia.page("New York")<br/>
15+
>>> ny.title<br/>
16+
output : u'New York'
17+
>>> ny.url<br/>
18+
output : *[Click URL :](u'http://en.wikipedia.org/wiki/New_York')<br/>
19+
>>> ny.content<br/>
20+
output : u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'...<br/>
21+
>>> ny.links[0]<br/>
22+
output : u'1790 United States Census'<br/>
23+
24+
>>> wikipedia.set_lang("fr")<br/>
25+
>>> wikipedia.summary("Facebook", sentences=1)<br/>
26+
output : Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des,<br/>
27+
informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes.<br/>

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...

0 commit comments

Comments
 (0)