def _download_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, tries=1, timeout=5, encoding=None, data=None, headers={}, query={}, expected_status=None):
    '\n        Return the data of the page as a string.\n\n        Arguments:\n        url_or_request -- plain text URL as a string or\n            a compat_urllib_request.Requestobject\n        video_id -- Video/playlist/item identifier (string)\n\n        Keyword arguments:\n        note -- note printed before downloading (string)\n        errnote -- note printed in case of an error (string)\n        fatal -- flag denoting whether error should be considered fatal,\n            i.e. whether it should cause ExtractionError to be raised,\n            otherwise a warning will be reported and extraction continued\n        tries -- number of tries\n        timeout -- sleep interval between tries\n        encoding -- encoding for a page content decoding, guessed automatically\n            when not explicitly specified\n        data -- POST data (bytes)\n        headers -- HTTP headers (dict)\n        query -- URL query (dict)\n        expected_status -- allows to accept failed HTTP requests (non 2xx\n            status code) by explicitly specifying a set of accepted status\n            codes. Can be any of the following entities:\n                - an integer type specifying an exact failed status code to\n                  accept\n                - a list or a tuple of integer types specifying a list of\n                  failed status codes to accept\n                - a callable accepting an actual failed status code and\n                  returning True if it should be accepted\n            Note that this argument does not affect success status codes (2xx)\n            which are always accepted.\n        '
    success = False
    try_count = 0
    while (success is False):
        try:
            res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query, expected_status=expected_status)
            success = True
        except compat_http_client.IncompleteRead as e:
            try_count += 1
            if (try_count >= tries):
                raise e
            self._sleep(timeout, video_id)
    if (res is False):
        return res
    else:
        (content, _) = res
        return content
Return the data of the page as a string.

Arguments:
url_or_request -- plain text URL as a string or
    a compat_urllib_request.Requestobject
video_id -- Video/playlist/item identifier (string)

Keyword arguments:
note -- note printed before downloading (string)
errnote -- note printed in case of an error (string)
fatal -- flag denoting whether error should be considered fatal,
    i.e. whether it should cause ExtractionError to be raised,
    otherwise a warning will be reported and extraction continued
tries -- number of tries
timeout -- sleep interval between tries
encoding -- encoding for a page content decoding, guessed automatically
    when not explicitly specified
data -- POST data (bytes)
headers -- HTTP headers (dict)
query -- URL query (dict)
expected_status -- allows to accept failed HTTP requests (non 2xx
    status code) by explicitly specifying a set of accepted status
    codes. Can be any of the following entities:
        - an integer type specifying an exact failed status code to
          accept
        - a list or a tuple of integer types specifying a list of
          failed status codes to accept
        - a callable accepting an actual failed status code and
          returning True if it should be accepted
    Note that this argument does not affect success status codes (2xx)
    which are always accepted.
def _download_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, tries=1, timeout=5, encoding=None, data=None, headers={}, query={}, expected_status=None):
    '\n        Return the data of the page as a string.\n\n        Arguments:\n        url_or_request -- plain text URL as a string or\n            a compat_urllib_request.Requestobject\n        video_id -- Video/playlist/item identifier (string)\n\n        Keyword arguments:\n        note -- note printed before downloading (string)\n        errnote -- note printed in case of an error (string)\n        fatal -- flag denoting whether error should be considered fatal,\n            i.e. whether it should cause ExtractionError to be raised,\n            otherwise a warning will be reported and extraction continued\n        tries -- number of tries\n        timeout -- sleep interval between tries\n        encoding -- encoding for a page content decoding, guessed automatically\n            when not explicitly specified\n        data -- POST data (bytes)\n        headers -- HTTP headers (dict)\n        query -- URL query (dict)\n        expected_status -- allows to accept failed HTTP requests (non 2xx\n            status code) by explicitly specifying a set of accepted status\n            codes. Can be any of the following entities:\n                - an integer type specifying an exact failed status code to\n                  accept\n                - a list or a tuple of integer types specifying a list of\n                  failed status codes to accept\n                - a callable accepting an actual failed status code and\n                  returning True if it should be accepted\n            Note that this argument does not affect success status codes (2xx)\n            which are always accepted.\n        '
    success = False
    try_count = 0
    while (success is False):
        try:
            res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query, expected_status=expected_status)
            success = True
        except compat_http_client.IncompleteRead as e:
            try_count += 1
            if (try_count >= tries):
                raise e
            self._sleep(timeout, video_id)
    if (res is False):
        return res
    else:
        (content, _) = res
        return content