wiki.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Jarvis 作者: sukeesh 项目源码 文件源码
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]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号