import re


def read_urls(filename):
    """Returns a list of the puzzle urls from the given log file,
    extracting the hostname from the filename itself.
    Screens out duplicate urls and returns the urls sorted into
    increasing order."""

    # NOTE: Hostname not longer exists
    hostName = 'http://'+ filename

    inFile = open(filename, 'r')
    urlList = []
    for line in inFile:
        match = re.search(r'"GET ([\S]+.jpg)', line)
        if match and match.group(1) not in urlList:
            urlList.append(match.group(1))

    for i, url in enumerate(urlList):
        urlList[i] = hostName + url

    # # NOTE: TEMP IMAGE
    urlList = ['http://a.abcnews.com/images/Business/GTY_stock_cash_pile_money_dollar_bills-thg-130726_33x16_1600.jpg']

    return sorted(urlList)