Opens a URL. If headers are passed as argument, no check is performed and
    the URL will be opened.

    @param url: the URL to open
    @type url: string

    @param headers: the headers to use
    @type headers: dictionary

    @return: a file-like object as returned by urllib2.urlopen.

def open_url(url, headers=None):
    """
    Opens a URL. If headers are passed as argument, no check is performed and
    the URL will be opened.

    @param url: the URL to open
    @type url: string

    @param headers: the headers to use
    @type headers: dictionary

    @return: a file-like object as returned by urllib2.urlopen.
    """
    request = urllib2.Request(url)
    if headers:
        for key, value in headers.items():
            request.add_header(key, value)
    return URL_OPENER.open(request)