def listGrid(url, pluginhandle, sky_main): grid_url = urllib.unquote_plus( util.parameters_string_to_dict(url, 0)['end_of_url']) filename = util.filename_creator(grid_url) try: if util.get_mod(filename) == False: x = pickle.load(open(filename, "rb")) if util.get_mod(filename) == True: x = scrap_grid.grid_scraper(grid_url, filename) except: x = scrap_grid.grid_scraper(grid_url, filename) for i in x: name = i[0] url = i[1] thumb_end = i[2] nextMode = i[3] if thumb_end[0:2] == 'ht': thumbUrl = thumb_end else: x = urllib.quote(thumb_end) thumbUrl = sky_main + x joined = "name=" + urllib.quote_plus( name) + "&end_of_url=" + urllib.quote_plus(url) util.addDir(name, joined, nextMode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def list_atozDir(url, pluginhandle, sky_main): list_url = sky_main+urllib.unquote_plus(util.parameters_string_to_dict(url,0)['end_of_url']) x = scrap_atoz.scrap_atozdir(list_url) for i in x: name = i[1] url = i[0] mode = "atoz" thumbUrl = '' util.addDir(name, url, mode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def list_atozDir(url, pluginhandle, sky_main): list_url = sky_main + urllib.unquote_plus( util.parameters_string_to_dict(url, 0)['end_of_url']) x = scrap_atoz.scrap_atozdir(list_url) for i in x: name = i[1] url = i[0] mode = "atoz" thumbUrl = '' util.addDir(name, url, mode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def listCatchtv_submenus(url, pluginhandle, sky_main): sub_url = sky_main+urllib.unquote_plus(util.parameters_string_to_dict(url,0)['end_of_url']) level = 1 filename = util.filename_creator(sub_url) try: if util.get_mod(filename) == False: x = pickle.load(open(filename, "rb")) if util.get_mod(filename) == True: x = scrap_menus.scrapODmenus(sub_url, level, filename) except: x = scrap_menus.scrapODmenus(sub_url, level, filename) #create cache files and returns the database for i in x: name = i[0] url = i[1] mode = i[2] join = "name="+urllib.quote_plus(name)+"&end_of_url="+urllib.quote_plus(url) thumbUrl = "" util.addDir(name, join, mode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def listGrid(url, pluginhandle, sky_main): grid_url = urllib.unquote_plus(util.parameters_string_to_dict(url,0)['end_of_url']) filename = util.filename_creator(grid_url) try: if util.get_mod(filename) == False: x = pickle.load(open(filename, "rb")) if util.get_mod(filename) == True: x = scrap_grid.grid_scraper(grid_url, filename) except: x = scrap_grid.grid_scraper(grid_url, filename) for i in x: name = i[0] url = i[1] thumb_end = i[2] nextMode = i[3] if thumb_end[0:2] == 'ht': thumbUrl = thumb_end else: x = urllib.quote(thumb_end) thumbUrl = sky_main+x joined = "name="+urllib.quote_plus(name)+"&end_of_url="+urllib.quote_plus(url) util.addDir(name, joined, nextMode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def listCatchtv_submenus(url, pluginhandle, sky_main): sub_url = sky_main + urllib.unquote_plus( util.parameters_string_to_dict(url, 0)['end_of_url']) level = 1 filename = util.filename_creator(sub_url) try: if util.get_mod(filename) == False: x = pickle.load(open(filename, "rb")) if util.get_mod(filename) == True: x = scrap_menus.scrapODmenus(sub_url, level, filename) except: x = scrap_menus.scrapODmenus( sub_url, level, filename) #create cache files and returns the database for i in x: name = i[0] url = i[1] mode = i[2] join = "name=" + urllib.quote_plus( name) + "&end_of_url=" + urllib.quote_plus(url) thumbUrl = "" util.addDir(name, join, mode, thumbUrl) added = True xbmcplugin.endOfDirectory(pluginhandle)
def playLiveVideo(url): xbmc.Player().stop() xbmc.executebuiltin('Notification(Loading....,Please Wait!,500,logo.png)') chn_URL = util.get_live_playurl(url) exepass = [chn_URL, username, password, sleep1, sleep2, mousex, mousey, splashy, splashpath, focus] subprocess.Popen([utilityPath]+exepass) def playOnDemand(url): xbmc.Player().stop() xbmc.executebuiltin('Notification(Loading....,Please Wait!,500,logo.png)') content_url = util.get_on_playurl(url) exepass = [content_url, username, password, sleep1, sleep2, mousex, mousey, splashy, splashpath, focus] subprocess.Popen([utilityPath]+exepass) params = util.parameters_string_to_dict(sys.argv[2],1) mode = urllib.unquote_plus(params.get('mode', '')) url = urllib.unquote_plus(params.get('url', '')) ID = urllib.unquote_plus(params.get('ID', '')) epgid = urllib.unquote_plus(params.get('epgID', '')) def main(): if mode==None: pass if mode == "playTVGuide": playTVGuideLive(ID) if mode == "videoId": playOnDemand(url) if mode == 'playVideo': playLiveVideo(url)
] subprocess.Popen([utilityPath] + exepass) def playOnDemand(url): xbmc.Player().stop() xbmc.executebuiltin('Notification(Loading....,Please Wait!,500,logo.png)') content_url = util.get_on_playurl(url) exepass = [ content_url, username, password, sleep1, sleep2, mousex, mousey, splashy, splashpath, focus ] subprocess.Popen([utilityPath] + exepass) params = util.parameters_string_to_dict(sys.argv[2], 1) mode = urllib.unquote_plus(params.get('mode', '')) url = urllib.unquote_plus(params.get('url', '')) ID = urllib.unquote_plus(params.get('ID', '')) epgid = urllib.unquote_plus(params.get('epgID', '')) def main(): if mode == None: pass if mode == "playTVGuide": playTVGuideLive(ID) if mode == "videoId": playOnDemand(url) if mode == 'playVideo': playLiveVideo(url)