def check_dupes(urls):
    """
    Given a list of urls, checks for duplicates and then checks
    for already downloaded files using url ending as filename.
    """
    amount_start = len(urls)
    print(f'{len(urls)} have been given.')
    urls = list(dict.fromkeys(urls))
    print(
        f'Removed {amount_start - len(urls)} duplicates and already downloaded links, {len(urls)} are left to download.'
        )
    return urls
