GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mhluongo/wiki-api: A basic python library enabling access to Wikipedia.org's search results and article content.

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
wikiapi
wikiapi
 
 
.gitignore
.gitignore
 
 
MANIFEST
MANIFEST
 
 
README.md
README.md
 
 
setup.py
setup.py
 
 

Repository files navigation

wiki-api

A basic python library enabling access to Wikipedia.org's search results and articles.

How To Use

Install WikiApi

sudo pip install wikiapi

Create an instance of wiki-api

wiki = WikiApi()
wiki = WikiApi({ 'locale' : 'es'}) # to specify your locale, 'en' is default

Search for something on wikipedia

results = wiki.find('Barack Obama') => ['Barack_Obama', 'Barack_Obama_presidential_campaign,_2008', ...]

Get information about a wiki article

article = wiki.get_article(results[0])

article.heading => 'Barack Obama'
article.image => 'http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/220px-Official_portrait_of_Barack_Obama.jpg'
article.summary => 'Barack Hussein Obama II (i/bəˈrɑːk huːˈseɪn oʊˈbɑːmə/; born August 4, 1961) is the 44th and current President of th...'
article.references => ['Obama: No green light for Israel to attack Iran. Cnn.com. 2009-07-07. http://www.cnn.com/2009/POLITICS/07/07/obama.israel.iran/. Retrieved January 4, 2013.', ..., .., ...]
article.content => 'Full article dump...'

Requirements

1. Python 2.7
2. Python requests "requests"
3. PyQuery "pyquery"

Tests

Tests can be found in /tests.

About

A basic python library enabling access to Wikipedia.org's search results and article content.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.