def drawSports4u(page): jsonChannels = Sports4u.getChannels(page) for item in jsonChannels: title = item["title"] link = item["link"] mode = 106 #next step returns a final link if item.has_key("thumbnail"): image = item["thumbnail"] else: image = icon add_dir(title, link, mode, image, "sports4u", link)
def drawSports4u(page): jsonChannels = Sports4u.getChannels(page) for item in jsonChannels: title = item["title"] link = item["link"] mode = 106 # next step returns a final link if item.has_key("thumbnail"): image = item["thumbnail"] else: image = icon add_dir(title, link, mode, image, "sports4u", link)
def openSports4uLink(url, page): channel = Sports4u.getChannels(page) logger.info("found link: " + channel[0]["link"] + ", launching...") open(channel[0]["link"], page)