import requests
from bs4 import BeautifulSoup


def ls(url, ext):
    """ Returns a list of url's having the given extension

    :param url: the url of which you want the url's
    :param ext: the extension of the files you want
    """
    page = requests.get(url).text
    soup = BeautifulSoup(page, 'html.parser')
    return [url + '/' + node.get('href') for node in soup.find_all('a') if node.get('href').endswith(ext)]