'Check if markup looks like it\'s actually a url and raise a warning
if so. Markup can be unicode or str (py2) / bytes (py3).'

@staticmethod
def _check_markup_is_url(markup):

    if isinstance(markup, bytes):
        space = '    '
        cant_start_with = ('http:', 'https:')
    elif isinstance(markup, unicode):
        space = u'    '
        cant_start_with = (u'http:', u'https:')
    else:
        return
    if any((markup.startswith(prefix) for prefix in cant_start_with)):
        if (not (space in markup)):
            if isinstance(markup, bytes):
                decoded_markup = markup.decode('utf-8', 'replace')
            else:
                decoded_markup = markup
            warnings.warn(('"%s"    looks    like    a    URL.    Beautiful    Soup    is    not    an    HTTP    client.    You    should    probably    use    an    HTTP    client    like    requests    to    get    the    document    behind    the    URL,    and    feed    that    document    to    Beautiful    Soup.' % decoded_markup))
