python wikipediaapi

Solutions on MaxInterview for python wikipediaapi by the best coders in the world

showing results for - "python wikipediaapi"
Amelie
26 Apr 2019
1import wikipediaapi
2
3wiki = wikipediaapi.Wikipedia("en")
4page = wiki.page("Python (programming language)")
5
6print(page.summary)
7# Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation. Its
8# language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.
9# Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming.
10# Python is often described as a "batteries included" language due to its comprehensive standard library.Guido van Rossum began working on Python in the late 1980\'s,
11# as a successor to the ABC programming language, and first released it in 1991 as Python 0.9.1. Python 2.0 was released in 2000 and introduced new features, such as list comprehensions
12# and a garbage collection system using reference counting and was discontinued with version 2.7.18 in 2020. Python 3.0 was released in 2008 and was a major revision of the
13# language that is not completely backward-compatible and much Python 2 code does not run unmodified on Python 3.
14# Python consistently ranks as one of the most popular programming languages.
Jazmín
04 Jan 2018
1import wikipedia
2print wikipedia.summary("Wikipedia")
3# Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...
4
5wikipedia.search("Barack")
6# [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']
7
8ny = wikipedia.page("New York")
9ny.title
10# u'New York'
11ny.url
12# u'http://en.wikipedia.org/wiki/New_York'
13ny.content
14# u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'...
15ny.links[0]
16# u'1790 United States Census'
17
18wikipedia.set_lang("fr")
19wikipedia.summary("Facebook", sentences=1)
20# 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.
21