Exemple #1
0
def get_wiki_summary(title):

    summary = None
    f = WikiwareFetch()
    html = f.fetch_api_parse(title=title, section="0")
    if html:
        p = WikiwareAPIParseSummary(content=html)
        summary = p.get_summary()
    return summary
Exemple #2
0
def get_wiki_summary(title):

    summary = None
    f = WikiwareFetch()
    html = f.fetch_api_parse(title=title, section="0")
    if html:
        p = WikiwareAPIParseSummary(content=html)
        summary = p.get_summary()
    return summary
Exemple #3
0
def get_wiki_summary(title):
    """ Get the summary for a geography section of a wiki page """
    summary = None
    f = WikiwareFetch()
    html = f.fetch_api_parse(title=title, section="0")
    if html:
        p = WikiwareAPIParseSummary(content=html)
        if p.is_category(defaults.WIKIWARE_CATEGORY_TYPE_GEOGRAPHY):
            p.set_attr(attr={"id": pattern_coordinates})
            summary = p.get_summary()
    return summary
Exemple #4
0
def get_wiki_summary(title):
    """ Get the summary for a geography section of a wiki page """
    summary = None
    f = WikiwareFetch()
    html = f.fetch_api_parse(title=title, section="0")
    if html:
        p = WikiwareAPIParseSummary(content=html)
        if p.is_category(defaults.WIKIWARE_CATEGORY_TYPE_GEOGRAPHY):
            p.set_attr(attr={'id': pattern_coordinates})
            summary = p.get_summary()
    return summary