'Returns a tuple (page content as string, URL handle)'

def _download_webpage_handle(self, url_or_request, video_id, note=None, errnote=None, fatal=True, encoding=None, data=None, headers={}, query={}):

    if isinstance(url_or_request, (compat_str, str)):
        url_or_request = url_or_request.partition(u'#')[0]
    if self._x_forwarded_for_ip:
        if (u'X-Forwarded-For' not in headers):
            headers[u'X-Forwarded-For'] = self._x_forwarded_for_ip
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
    if (urlh is False):
        assert (not fatal)
        return False
    content = self._webpage_read_content(urlh, url_or_request, video_id, note, errnote, fatal, encoding=encoding)
    return (content, urlh)
