import re


def remove_links(input_text):
    """
    Remove links from the input text.
    从输入文本中删除链接
    
    :param input_text: 
    :return:
    >>> remove_links('The Buccaneers just gave a $19 million contract to a punter http://t.co/ZYTqUhn/jhjhf?asas=sad via @89YahooSports wow')
    'The Buccaneers just gave a $19 million contract to a punter via @89YahooSports wow'
    >>> remove_links('The Buccaneers just gave a $19 million contract to a punter http://t.co/ZYTqUhn/jhjh')
    'The Buccaneers just gave a $19 million contract to a punter '
    >>> remove_links('The Buccaneers just gave a www.google.com was there.')
    'The Buccaneers just gave a was there.'
    >>> remove_links('The Buccaneers just gave a www.goo-gle.com was there.')
    'The Buccaneers just gave a was there.'
    """
    input_text = re.sub(r"(https?://www\.|https?://|www\.)[\w\-]+?(\.[a-zA-Z]+)+(/[^\s]+)*\s*", "", input_text)
    return input_text