def content(title=None, pageid=None, auto_suggest=True, redirect=True, preload=False):
"""Returns plain text content of query's page, excluding images, tables and other data."""
try:
page = wikipedia.page(title)
return page.content
except wikipedia.exceptions.PageError:
return "No page matches, try another item."
except wikipedia.exceptions.DisambiguationError as error:
return error.options[:5]
评论列表
文章目录