import re


def remove_links(text):
    """
    Method used to remove the occurrences of links from the text

    Parameters:
    -----------------
        text (string): Text to clean

    Returns:
    -----------------
        text (string): Text after removing links.

    """

    # Removing all the occurrences of links that starts with https
    remove_https = re.sub(r"http\S+", "", text)

    # Remove all the occurrences of text that ends with .com
    # and start with http
    text = re.sub(r"\ [A-Za-z]*\.com", " ", remove_https)

    return text