def word_analyze(url):
    import requests
    from bs4 import BeautifulSoup
    print('')
    try:
        webpage = requests.get(url)
        pagedata = webpage.text
        soup = BeautifulSoup(pagedata, 'html.parser')
    except requests.exceptions.ConnectionError:
        print('\x1b[1;31m[\x1b[1;31m-\x1b[1;39m] ERROR CONNECTING THE SERVER...')
        exit()
    for script in soup(['script', 'style']):
        script.extract()
    text1 = soup.get_text()
    text = str(text1.strip())
    feb = text.split()
    iscount = feb.count('is')
    wascount = feb.count('was')
    arecount = feb.count('are')
    forcount = feb.count('for')
    thecount = feb.count('the')
    ofcount = feb.count('of')
    tocount = feb.count('to')
    try:
        isinit = 0
        while (isinit <= iscount):
            feb.remove('is')
            isinit = (isinit + 1)
        wasinit = 0
        while (wasinit <= wascount):
            feb.remove('was')
            wasinit = (wasinit + 1)
        areinit = 0
        while (areinit <= arecount):
            feb.remove('are')
            areinit = (areinit + 1)
        forinit = 0
        while (forinit <= forcount):
            feb.remove('for')
            forinit = (forinit + 1)
        theinit = 0
        while (theinit <= thecount):
            feb.remove('the')
            theinit = (theinit + 1)
        ofinit = 0
        while (ofinit <= ofcount):
            feb.remove('of')
            ofinit = (ofinit + 1)
        toinit = 0
        while (toinit <= tocount):
            feb.remove('to')
            toinit = (toinit + 1)
    except ValueError:
        pass
    feb.sort()
    print(('\x1b[1;32m-' * 74))
    print('\x1b[1;32m|           Words    |     count/frequency    |        Graph              |  ')
    print(('\x1b[1;32m-' * 74))
    for string in feb:
        count = feb.count(string)
        for i in range(count):
            feb.remove(string)
        print(f"[1;34m| {((string + (' ' * (22 - len(string)))) + '| ')}{(str(count) + (' ' * (22 - len(str(count)))))}|    [1;32m{('█' * count)}  ")
        print(('\x1b[1;33m-' * 74))
def word_analyze(url):
    import requests
    from bs4 import BeautifulSoup
    print()
    try:
        webpage = requests.get(url)
        pagedata = webpage.text
        soup = BeautifulSoup(pagedata, 'html.parser')
    except requests.exceptions.ConnectionError:
        print('\x1b[1;31m[\x1b[1;31m-\x1b[1;39m] ERROR CONNECTING THE SERVER...')
        exit()
    for script in soup(['script', 'style']):
        script.extract()
    text1 = soup.get_text()
    text = str(text1.strip())
    feb = text.split()
    iscount = feb.count('is')
    wascount = feb.count('was')
    arecount = feb.count('are')
    forcount = feb.count('for')
    thecount = feb.count('the')
    ofcount = feb.count('of')
    tocount = feb.count('to')
    try:
        isinit = 0
        while (isinit <= iscount):
            feb.remove('is')
            isinit = (isinit + 1)
        wasinit = 0
        while (wasinit <= wascount):
            feb.remove('was')
            wasinit = (wasinit + 1)
        areinit = 0
        while (areinit <= arecount):
            feb.remove('are')
            areinit = (areinit + 1)
        forinit = 0
        while (forinit <= forcount):
            feb.remove('for')
            forinit = (forinit + 1)
        theinit = 0
        while (theinit <= thecount):
            feb.remove('the')
            theinit = (theinit + 1)
        ofinit = 0
        while (ofinit <= ofcount):
            feb.remove('of')
            ofinit = (ofinit + 1)
        toinit = 0
        while (toinit <= tocount):
            feb.remove('to')
            toinit = (toinit + 1)
    except ValueError:
        pass
    feb.sort()
    print(('\x1b[1;32m-' * 74))
    print('\x1b[1;32m|           Words    |     count/frequency    |        Graph              |  ')
    print(('\x1b[1;32m-' * 74))
    for string in feb:
        count = feb.count(string)
        for i in range(count):
            feb.remove(string)
        print(f"[1;34m| {((string + (' ' * (22 - len(string)))) + '| ')}{(str(count) + (' ' * (22 - len(str(count)))))}|    [1;32m{('█' * count)}  ")
        print(('\x1b[1;33m-' * 74))