import requests
from bs4 import BeautifulSoup


def get_http_files(url, ext=''):
    """
    Returns list file listing from HTTP/HTTPS directory
    """
    # Get HTML page
    page = requests.get(url).text
    soup = BeautifulSoup(page, 'html.parser')

    # Get file listing
    files = [url + '/' + node.get('href') for node in soup.find_all('a') if node.get('href').endswith(ext) and 'latest' not in node.get('href')]

    return files