I was searching through PyPi one day and came across an interesting package called Wikipedia. After looking at the documentation, I thought this would be a great project to try. The Wikipedia package is very simple and does exactly what you think it does. If you ask it to search Wikipedia, it will search the Wikipedia pages for the search criteria you enter. For instance, if you search my last name "Windrem", Wikipedia will return a list of 10 related pages. From there you can bring up the details on any of these pages such as the URL, title, summary and content. I created this page to show a sample of how to use the Wikipedia interface for Python.
In the text box below, type in your search criteria to search the Wikipedia archive about. Once the search is done, a list of related topic pages will be presented below that you can search through and click the links to go to the related wikipedia page.
The code for this snippet is very straightforward. The code retrieves the form data for the given search term. We then use the wikipedia search method to find relevant articles and then get details of those articles using the page method.