import requests


def _get_url(url, type_=None, cookies=None):
    """Get content on given HTTP(S) url using Wget user agent.

    This method uses :mod:`requests` to make the request. The
    `type_` that is passed determines some behavior. Passing
    `rss` will set the `Accept` header to request
    `'application/rss+xml,application/rdf+xml,application/atom+xml,text/xml'`.

    :type url: str
    :param url: URL to fetch from
    :type type_: str
    :param type_: A string indicating the type of resource.
    :type cookies: dict
    :param cookies: Cookies to send with the request
    :returns: Response object
    :rtype: requests.Response
    """
    head = {
        'User-Agent': 'Wget/1.13.4 (linux-gnu)',
        'Connection': 'Close',
        'Proxy-Connection': 'Keep-Alive'
    }
    if type_ == 'rss':
        head['Accept'] = 'application/rss+xml,application/rdf+xml,application/atom+xml,text/xml'

    return requests.get(url, headers=head, cookies=cookies)