import requests
from bs4 import BeautifulSoup


def get_document(url, payload):
    """
    Load content from url and return a query enabled document. A dictionary
    of get parameters can be set in payload.
    """
    request = requests.get(url, params=payload)
    return BeautifulSoup(request.text, 'xml')