def _request_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, data=None, headers={}, query={}, expected_status=None):
    '\n        Return the response handle.\n\n        See _download_webpage docstring for arguments specification.\n        '
    if (note is None):
        self.report_download_webpage(video_id)
    elif (note is not False):
        if (video_id is None):
            self.to_screen(('%s' % (note,)))
        else:
            self.to_screen(('%s: %s' % (video_id, note)))
    if self._x_forwarded_for_ip:
        if ('X-Forwarded-For' not in headers):
            headers['X-Forwarded-For'] = self._x_forwarded_for_ip
    if isinstance(url_or_request, compat_urllib_request.Request):
        url_or_request = update_Request(url_or_request, data=data, headers=headers, query=query)
    else:
        if query:
            url_or_request = update_url_query(url_or_request, query)
        if ((data is not None) or headers):
            url_or_request = sanitized_Request(url_or_request, data, headers)
    exceptions = [compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error]
    if hasattr(ssl, 'CertificateError'):
        exceptions.append(ssl.CertificateError)
    try:
        return self._downloader.urlopen(url_or_request)
    except tuple(exceptions) as err:
        if isinstance(err, compat_urllib_error.HTTPError):
            if self.__can_accept_status_code(err, expected_status):
                err.fp._error = err
                return err.fp
        if (errnote is False):
            return False
        if (errnote is None):
            errnote = 'Unable to download webpage'
        errmsg = ('%s: %s' % (errnote, error_to_compat_str(err)))
        if fatal:
            raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
        else:
            self._downloader.report_warning(errmsg)
            return False
Return the response handle.

See _download_webpage docstring for arguments specification.
def _request_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, data=None, headers={}, query={}, expected_status=None):
    '\n        Return the response handle.\n\n        See _download_webpage docstring for arguments specification.\n        '
    if (note is None):
        self.report_download_webpage(video_id)
    elif (note is not False):
        if (video_id is None):
            self.to_screen(('%s' % (note,)))
        else:
            self.to_screen(('%s: %s' % (video_id, note)))
    if self._x_forwarded_for_ip:
        if ('X-Forwarded-For' not in headers):
            headers['X-Forwarded-For'] = self._x_forwarded_for_ip
    if isinstance(url_or_request, compat_urllib_request.Request):
        url_or_request = update_Request(url_or_request, data=data, headers=headers, query=query)
    else:
        if query:
            url_or_request = update_url_query(url_or_request, query)
        if ((data is not None) or headers):
            url_or_request = sanitized_Request(url_or_request, data, headers)
    exceptions = [compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error]
    if hasattr(ssl, 'CertificateError'):
        exceptions.append(ssl.CertificateError)
    try:
        return self._downloader.urlopen(url_or_request)
    except tuple(exceptions) as err:
        if isinstance(err, compat_urllib_error.HTTPError):
            if self.__can_accept_status_code(err, expected_status):
                err.fp._error = err
                return err.fp
        if (errnote is False):
            return False
        if (errnote is None):
            errnote = 'Unable to download webpage'
        errmsg = ('%s: %s' % (errnote, error_to_compat_str(err)))
        if fatal:
            raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
        else:
            self._downloader.report_warning(errmsg)
            return False