def endpoint_harvest(url):
    print(f'[[1;37m+[1;39m] Collecting Endpoints / Links from the webpage {url}')
    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()
    endpoint_pattern1 = re.compile('(?:href=")(.*?)"')
    endpoint_pattern2 = re.compile('(?:src=")(.*?)"')
    endpoint1 = endpoint_pattern1.findall(pagedata)
    endpoint2 = endpoint_pattern2.findall(pagedata)
    for link in endpoint1:
        print(link.replace('href=', '').replace("'", '').replace('>', '').replace('"', '').replace('</', ' '))
    for src in endpoint2:
        print(src.replace('src=', '').replace("'", '').replace('>', '').replace('"', '').replace('</', ' '))
    print('')
    print('[\x1b[1;37m+\x1b[1;39m] Finished!')
def endpoint_harvest(url):
    print(f'[[1;37m+[1;39m] Collecting Endpoints / Links from the webpage {url}')
    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()
    endpoint_pattern1 = re.compile('(?:href=")(.*?)"')
    endpoint_pattern2 = re.compile('(?:src=")(.*?)"')
    endpoint1 = endpoint_pattern1.findall(pagedata)
    endpoint2 = endpoint_pattern2.findall(pagedata)
    for link in endpoint1:
        print(link.replace('href=', ).replace("'", ).replace('>', ).replace('"', ).replace('</', ' '))
    for src in endpoint2:
        print(src.replace('src=', ).replace("'", ).replace('>', ).replace('"', ).replace('</', ' '))
    print()
    print('[\x1b[1;37m+\x1b[1;39m] Finished!')