import requests


def extract_stream_url(ashx_url):
    """ Extract real stream url from tunein stream url """
    r = requests.get(ashx_url)
    for l in r.text.splitlines():
        if len(l) != 0:
            return l