Back to Browse

Customizing Wikipedia's Random Article Generator with Python

1.3K views
Aug 1, 2020
12:57

In this video I create three functions to filter random wikipedia articles for better content. The first one excludes certain keywords if they appear in the articles extract, the second one specifically searches for articles with certain keywords in the articles extract and the final one searches the entire article for the keywords. To do this I used the Wikimedia REST API, the python requests library, and the python webbrowser library. https://requests.readthedocs.io/en/master/ https://docs.python.org/2/library/webbrowser.html Before you can use the requests library, you need to install it on your machine. All i did was type 'pip install --user requests' to accomplish this. The official installation guide for the requests library is here https://requests.readthedocs.io/en/master/user/install/#install #python #pythonproject

Download

1 formats

Video Formats

360pmp424.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Customizing Wikipedia's Random Article Generator with Python | NatokHD