import sys
import wikipedia
import logging
logger = logging.getLogger(__name__)


def do(query, lang):
    wikipedia.set_lang(lang)
    # ret = wikipedia.page(query).summary
    ret = wikipedia.page(query).content
    # logger.debug(ret.original_title)
    return ret


def main():
    query = "test"
    if len(sys.argv) > 1:
        query = sys.argv[1]
    logger.debug(do(query, 'pl'))

if __name__ == '__main__':
    main()
    sys.exit()
