alexanderholt
12/18/2017 - 3:31 AM

Pull section of WIkipedia page

Pull specific section of Wikipedia page using wikipedia python package

# get the section of a page. In this case the Plot description of Metropolis
section = wikipedia.WikipediaPage('Metropolis (1927 film)').section('Plot')

# that will return fairly clean text, but the next line of code
# will help clean that up.
section = section.replace('\n','').replace("\'","")