def player(item): logger.info("[mondolunatico2.py] player") data = httptools.downloadpage(item.url, headers=headers).data item.url = scrapertools.find_single_match(item.url, r'([^/]+//[^/]+/[^/]+/[^/]+)') if "https://mondolunatico.tk" in data: data = httptools.downloadpage(item.url, headers=headers).data link = scrapertools.find_single_match( data, r'<p><iframe src="(.*?/.*?)[A-Z]') item.url = link return halfplayer(item) if "mondolunatico.tk" in item.url: return halfplayer(item) #Scarica il link del video integrato nella pagina ret = support.dooplay_get_links(item, host) #Prelevo il link del video integrato url = ret[0]["url"] data = httptools.downloadpage(url, headers=headers).data if "zmdi zmdi-playlist-audio zmdi-hc-3x" in data: return player_list(item) else: #Correggo il link con il lin del POST url = url.replace("/v/", "/api/source/").replace("/p/", "/api/source/") postData = urllib.urlencode({ "r": "", "d": "modolunatico.tk", }) block = httptools.downloadpage(url, post=postData).data patron = r'"file":".*?\/(r[^"]+)' matches = re.compile(patron, re.DOTALL).findall(block) itemlist = [] for scrapedurl in matches: scrapedurl = "https://fvs.io/" + scrapedurl itemlist.append( Item(channel=channel, action="play", contentType=item.contentType, title=item.title, thumbnail=item.thumbnail, fulltitle=item.title, url=scrapedurl, show=item.show)) autoplay.start(itemlist, item) return itemlist
def controls(itemlist, item, AutoPlay=True, CheckLinks=True): from core import jsontools from platformcode.config import get_setting CL = get_setting('checklinks') or get_setting('checklinks', item.channel) autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') channel_node = autoplay_node.get(item.channel, {}) if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel]) autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality) autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') channel_node = autoplay_node.get(item.channel, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] if CL and not AP: if get_setting('checklinks', item.channel): checklinks = get_setting('checklinks', item.channel) else: checklinks = get_setting('checklinks') if get_setting('checklinks_number', item.channel): checklinks_number = get_setting('checklinks_number', item.channel) else: checklinks_number = get_setting('checklinks_number') itemlist = servertools.check_list_links(itemlist, checklinks_number) if AutoPlay == True: autoplay.start(itemlist, item) videolibrary(itemlist, item, function_level=3) return itemlist
def videoplayer(item): logger.info("[mondolunatico2.py] videoplayer") itemlist = [] for link in support.dooplay_get_links(item, host): server = link['server'][:link['server'].find(".")] if server == "": server = "mondolunatico" itemlist.append( Item(channel=item.channel, action="player" if "mondolunatico" in server else "play", title=server + " [COLOR blue][" + link['title'] + "][/COLOR]", url=link['url'], server=server, fulltitle=item.fulltitle, thumbnail=item.thumbnail, show=item.show, quality=link['title'], contentType=item.contentType, folder=False)) support.videolibrary(itemlist, item, 'color kod', function_level=2) autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info(item.channel + 'findvideos') if item.contentType == 'movie': data = httptools.downloadpage(item.url, headers=headers).data else: data = item.url itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = item.title + ' - [COLOR limegreen][[/COLOR]' + videoitem.title + '[COLOR limegreen]][/COLOR]' videoitem.fulltitle = item.fulltitle videoitem.thumbnail = item.thumbnail videoitem.show = item.show videoitem.plot = item.plot videoitem.channel = item.channel videoitem.contentType = item.contentType videoitem.quality = item.quality autoplay.start(itemlist, item) if item.contentType != 'episode': if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, title='[COLOR yellow][B]'+config.get_localized_string(30161)+'[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findvideos", contentTitle=item.fulltitle)) return itemlist
def findvideos(item): logger.info(item.channel + 'findvideos') itemlist = [] logger.info('TYPE= ' + item.contentType) if item.contentType == 'movie': data = httptools.downloadpage(item.url, headers=headers).data logger.info('DATA= ' + data) item.url = scrapertoolsV2.find_single_match(data, r'<table>(.*?)<\/table>') urls = scrapertoolsV2.find_multiple_matches( item.url, r"<a href='([^']+)'.*?>.*?>.*?([a-zA-Z]+).*?<\/a>") logger.info('EXTRA= ' + item.extra) for url, server in urls: itemlist.append( Item(channel=item.channel, action='play', title=item.title + ' [COLOR blue][' + server + '][/COLOR]', contentType="movie", server=server, url=url)) autoplay.start(itemlist, item) return itemlist
def findvideos(item): findhost() itemlist = [] for link in support.dooplay_get_links(item, host): if link['title'] != 'Trailer': logger.info(link['title']) server, quality = scrapertoolsV2.find_single_match( link['title'], '([^ ]+) ?(HD|3D)?') if quality: title = server + " [COLOR blue][" + quality + "][/COLOR]" else: title = server itemlist.append( Item(channel=item.channel, action="play", title=title, url=link['url'], server=server, fulltitle=item.fulltitle, thumbnail=item.thumbnail, show=item.show, quality=quality, contentType=item.contentType, folder=False)) autoplay.start(itemlist, item) return itemlist
def findvideos(item): data = httptools.downloadpage(item.url).data patron = r"<li id='player-.*?'.*?class='dooplay_player_option'\sdata-type='(.*?)'\sdata-post='(.*?)'\sdata-nume='(.*?)'>.*?'title'>(.*?)</" matches = re.compile(patron, re.IGNORECASE).findall(data) itemlist = [] for scrapedtype, scrapedpost, scrapednume, scrapedtitle in matches: itemlist.append( Item(channel=item.channel, action="play", fulltitle=item.title + " [" + scrapedtitle + "]", show=scrapedtitle, title=item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]", url=host + "/wp-admin/admin-ajax.php", post=scrapedpost, server=scrapedtitle, nume=scrapednume, type=scrapedtype, extra=item.extra, folder=True)) autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info() itemlist = [] for url in item.url['links']: quality, language, plot, poster = set_extra_values(url) title = '' title = set_title(title, language, quality) itemlist.append( Item(channel=item.channel, title='%s' + title, url=url['url'], action='play', quality=quality, language=language, infoLabels=item.infoLabels)) itemlist = servertools.get_servers_itemlist( itemlist, lambda i: i.title % i.server.capitalize()) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info() itemlist = [] if item.contentType == 'episode': data = item.url urls = re.findall( r'<a\s*ref="nofollow" target="_blank" act="\d+"[^n]+newlink="([^"]+)" class="blue-link">[^<]+</a>', data, re.DOTALL) else: data = httptools.downloadpage(item.url).data urls = re.findall( r'<iframe\s*allowfullscreen class="embed-responsive-item" src="([^"]+)"></iframe></div>', data, re.DOTALL) if urls: for url in urls: url, c = unshortenit.unshorten(url) data += url + '\n' itemlist += servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = "[[COLOR green][B]%s[/B][/COLOR]] %s" % ( videoitem.title.capitalize(), item.title) videoitem.fulltitle = item.fulltitle videoitem.show = item.show videoitem.thumbnail = item.thumbnail videoitem.channel = item.channel videoitem.contentType = item.contentType videoitem.language = IDIOMAS['Italiano'] # Requerido para Filtrar enlaces if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) if item.contentType != 'episode': if config.get_videolibrary_support( ) and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, title= '[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) return itemlist
def findvideos(item): support.log() itemlist = support.server(item, data=item.url) # itemlist = filtertools.get_links(itemlist, item, list_language) autoplay.start(itemlist, item) return itemlist
def findvideos(item): # Questa def. deve sempre essere nominata findvideos logger.info('[filmsenzalimiticc.py] findvideos') itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data # Aggira protectlink if 'protectlink' in data: urls = scrapertools.find_multiple_matches( data, r'<iframe src="[^=]+=(.*?)"') for url in urls: url = url.decode('base64') if '\t' in url: #fix alcuni link presentano una tabulazione finale. url = url[:-1] data += '\t' + url if 'nodmca' in data: #fix player Openload sezione Serie TV page = httptools.downloadpage(url, headers=headers).data data += '\t' + scrapertools.find_single_match( page, '<meta name="og:url" content="([^=]+)">') itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = item.fulltitle + ' - [[COLOR limegreen]' + videoitem.title + '[/COLOR] ]' videoitem.fulltitle = item.fulltitle videoitem.thumbnail = item.thumbnail videoitem.show = item.show videoitem.plot = item.plot videoitem.channel = item.channel videoitem.contentType = item.contentType # Link Aggiungi alla Libreria if item.contentType != 'episode': if config.get_videolibrary_support( ) and len(itemlist) > 0 and item.extra != 'findservers': itemlist.append( Item(channel=item.channel, title= '[COLOR lightblue][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action='add_pelicula_to_library', extra='findservers', contentTitle=item.contentTitle)) # Necessario per filtrare i Link if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Necessario per AutoPlay autoplay.start(itemlist, item) return itemlist
def findvideos(item): log() itemlist = [] itemlist = support.hdpass_get_servers(item) if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) autoplay.start(itemlist, item) return itemlist
def findvideos(item): support.log() itemlist = support.server(item, headers=headers) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) return itemlist
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True): from core import jsontools from platformcode.config import get_setting CL = get_setting('checklinks') or get_setting('checklinks', item.channel) autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') channel_node = autoplay_node.get(item.channel, {}) if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel]) autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality) autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') channel_node = autoplay_node.get(item.channel, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] HS = config.get_setting('hide_servers') if CL and not AP: if get_setting('checklinks', item.channel): checklinks = get_setting('checklinks', item.channel) else: checklinks = get_setting('checklinks') if get_setting('checklinks_number', item.channel): checklinks_number = get_setting('checklinks_number', item.channel) else: checklinks_number = get_setting('checklinks_number') itemlist = servertools.check_list_links(itemlist, checklinks_number) if AutoPlay == True and not 'downloads' in inspect.stack( )[3][1] + inspect.stack()[4][1]: autoplay.start(itemlist, item) if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3) if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3) VL = False try: if 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1] or \ inspect.stack()[4][3] == 'play_from_library' or \ inspect.stack()[5][3] == 'play_from_library' or \ 'videolibrary' in inspect.stack()[3][1] or \ 'videolibrary' in inspect.stack()[4][1]: VL = True except: pass if not AP or VL or not HS: return itemlist
def findvideos(item): logger.info("[italiafilmvideohd.py] findvideos") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data patron = r'<div class="playerhdpass" id="playerhdpass"><iframe width=".+?" height=".+?" src="([^"]+)"' url = scrapertools.find_single_match(data, patron) if url: data += httptools.downloadpage(url, headers=headers).data itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = item.title + videoitem.title videoitem.fulltitle = item.fulltitle videoitem.thumbnail = item.thumbnail videoitem.show = item.show videoitem.plot = item.plot videoitem.channel = item.channel videoitem.contentType = item.contentType videoitem.language = IDIOMAS['Italiano'] # Requerido para Filtrar enlaces if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) if item.contentType != 'episode': if config.get_videolibrary_support( ) and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, title= '[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) return itemlist
def findvideos(item): logger.info("[casacinemaInfo.py] findvideos") itemlist = support.hdpass_get_servers(item) # Requerido para Filtrar enlaces if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para AutoPlay autoplay.start(itemlist, item) return itemlist
def findvideos(item): support.log() itemlist = support.hdpass_get_servers(item) if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # itemlist = filtertools.get_links(itemlist, item, list_language) autoplay.start(itemlist, item) support.videolibrary(itemlist, item ,'color kod bold') return itemlist
def findvideos(item): import urllib logger.info() itemlist = [] data = get_source(item.url) patron = 'id="Opt\d+">.*?src=(.*?) frameborder' matches = re.compile(patron, re.DOTALL).findall(data) for scrapedurl in matches: server = '' scrapedurl = scrapedurl.replace('"', '') new_data = get_source(scrapedurl) if "/stream/" in scrapedurl: scrapedurl = scrapertools.find_single_match( new_data, '<source src="([^"]+)"') server = "directo" else: scrapedurl = scrapertools.find_single_match( scrapedurl, '.*?url=([^&]+)?') scrapedurl = urllib.unquote(scrapedurl) if scrapedurl != '': itemlist.append( Item(channel=item.channel, title='%s', url=scrapedurl, action='play', language=item.language, infoLabels=item.infoLabels, server=server)) itemlist = servertools.get_servers_itemlist( itemlist, lambda x: x.title % x.server.capitalize()) if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) return itemlist
def dooplayer(item): support.log() itemlist = [] url = item.url data = httptools.downloadpage(url, headers=headers).data link = scrapertools.find_single_match( data, r'(https://mondolunatico.tk/./[^"]+)') data = httptools.downloadpage(link, headers=headers).data if "panel_toggle toggleable" in data: item.url = link return player_list(item) # Correggo il link con il lin del POST link1 = link.replace("/v/", "/api/source/").replace("/p/", "/api/source/") postData = urllib.urlencode({ "r": link, "d": "modolunatico.tk", }) block = httptools.downloadpage(link1, post=postData).data patron = r'"file":".*?\/(r[^"]+)' matches = re.compile(patron, re.DOTALL).findall(block) for scrapedurl in matches: scrapedurl = "https://fvs.io/" + scrapedurl itemlist.append( Item(channel=__channel__, action="play", contentType=item.contentType, title=item.title, thumbnail=item.thumbnail, fulltitle=item.title, url=scrapedurl, show=item.show)) autoplay.start(itemlist, item) support.videolibrary(itemlist, item, 'color kod') return itemlist
def findvideos(item): logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item)) itemlist = [] # scarico la pagina data = httptools.downloadpage(item.url, headers=headers).data # da qui fare le opportuni modifiche patron = '<a href="#" data-link="(.*?)">' matches = scrapertools.find_multiple_matches(data, patron) for scrapedurl in matches: logger.info("altadefinizione01_club scrapedurl log: %s" % scrapedurl) try: itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: logger.info("Videoitemlist2: %s" % videoitem) videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title) videoitem.show = item.show videoitem.contentTitle = item.contentTitle videoitem.contentType = item.contentType videoitem.channel = item.channel videoitem.year = item.infoLabels['year'] videoitem.infoLabels['plot'] = item.infoLabels['plot'] except AttributeError: logger.error("data doesn't contain expected URL") # Controlla se i link sono validi if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) # Aggiunge alla videoteca if item.extra != 'findvideos' and item.extra != "library" and config.get_videolibrary_support( ) and len(itemlist) != 0: support.videolibrary(itemlist, item) return itemlist
def findvideos(item): itemlist = [] for link in support.dooplay_get_links(item, host): server = link['server'][:link['server'].find(".")] itemlist.append( Item(channel=item.channel, action="play", title=server + " [COLOR blue][" + link['title'] + "][/COLOR]", url=link['url'], server=server, fulltitle=item.fulltitle, thumbnail=item.thumbnail, show=item.show, quality=link['title'], contentType=item.contentType, folder=False)) autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info('[filmigratis.py] findvideos') data = httptools.downloadpage(item.url, headers=headers).data itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = item.title + '[COLOR green][B] - ' + videoitem.title + '[/B][/COLOR]' videoitem.fulltitle = item.fulltitle videoitem.show = item.show videoitem.thumbnail = item.thumbnail videoitem.channel = item.channel videoitem.contentType = item.content if item.args == "film": support.videolibrary(itemlist, item, 'color kod') autoplay.start(itemlist, item) return itemlist
def findvideos(item): if item.quality.lower() in ["ended", "canceled", "returning series"]: return episodios(item) itemlist = [] data = scrapertoolsV2.decodeHtmlentities( httptools.downloadpage(item.url).data) btns = re.compile( r'data-tplayernv="Opt.*?><span>([^<]+)</span><span>([^<]+)</span>', re.DOTALL).findall(data) matches = re.compile(r'<iframe.*?src="([^"]+trembed=[^"]+)', re.DOTALL).findall(data) for i, scrapedurl in enumerate(matches): scrapedurl = scrapertoolsV2.decodeHtmlentities(scrapedurl) patron = r'<iframe.*?src="([^"]+)"' link_data = httptools.downloadpage(scrapedurl).data url = scrapertoolsV2.find_single_match(link_data, patron) itemlist.append( Item( channel=item.channel, action="play", contentType=item.contentType, title="[B]" + btns[i][0] + "[/B] - " + btns[i][1], fulltitle=btns[i][0] + " " + btns[i][1], show=btns[i][0] + " " + btns[i][1], url=url, extra=item.extra, infoLabels=item.infoLabels, server=btns[i][0], contentQuality=btns[i][1].replace('Italiano - ', ''), )) if item.contentType == "movie": support.videolibrary(itemlist, item) autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info(" findvideos") if item.contentType != "episode": return findvideos_movie(item) itemlist = servertools.find_video_items(data=item.url) logger.info(itemlist) for videoitem in itemlist: videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]']) videoitem.fulltitle = item.fulltitle videoitem.thumbnail = item.thumbnail videoitem.show = item.show videoitem.plot = item.plot videoitem.channel = item.channel videoitem.contentType = item.contentType videoitem.language = IDIOMAS['Italiano'] # Requerido para Filtrar enlaces if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) if item.contentType != 'episode': if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) return itemlist
def findvideos(item): logger.info('[filmsenzalimiti.py] findvideos') itemlist = support.hdpass_get_servers(item) # Link Aggiungi alla Libreria if item.contentType == 'movie': if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findservers': itemlist.append( Item(channel=item.channel, title='[COLOR lightblue][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findservers", contentTitle=item.contentTitle)) #Necessario per filtrare i Link if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Necessario per AutoPlay autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info("[toonitalia.py] findvideos") if item.args == 'film': data = httptools.downloadpage(item.url, headers=headers).data itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.channel = channel server = re.sub(r'[-\[\]\s]+', '', videoitem.title) videoitem.title = "".join([ '[COLOR blue] ' + "[[B]" + server + "[/B]][/COLOR] " + item.title ]) videoitem.thumbnail = item.thumbnail videoitem.plot = item.plot videoitem.fulltitle = item.fulltitle videoitem.show = item.show else: itemlist = servertools.find_video_items(data=item.url) for videoitem in itemlist: videoitem.channel = channel server = re.sub(r'[-\[\]\s]+', '', videoitem.title) videoitem.title = "".join([ '[COLOR blue] ' + "[[B]" + server + "[/B]] " + item.title + '[/COLOR]' ]) videoitem.thumbnail = item.thumbnail videoitem.plot = item.plot videoitem.fulltitle = item.fulltitle videoitem.show = item.show autoplay.start(itemlist, item) return itemlist
def findvideos(item): log() data = '' matches = support.match(item, 'str="([^"]+)"')[0] if matches: for match in matches: data += str(jsfunctions.unescape(re.sub('@|g','%', match))) data += str(match) log('DATA',data) if 'animepertutti' in data: log('ANIMEPERTUTTI!') else: data = '' itemlist = support.server(item,data) if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # itemlist = filtertools.get_links(itemlist, item, list_language) autoplay.start(itemlist, item) return itemlist
def findvideos(item): logger.info() itemlist = [] if 'links' in item.url: for url in item.url['links']: quality, language, plot, poster = set_extra_values(url) title = '' title = set_title(title, language, quality) itemlist.append( Item(channel=item.channel, title=format_title('%s' + title), url=url['url'], action='play', quality=quality, language=language, infoLabels=item.infoLabels)) itemlist = servertools.get_servers_itemlist( itemlist, lambda i: i.title % i.server.capitalize()) autoplay.start(itemlist, item) return itemlist
def aplay(item, itemlist, list_servers='', list_quality=''): if inspect.stack()[1][3] == 'mainlist': autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) else: autoplay.start(itemlist, item)
def findvideos(item): # Questa def. deve sempre essere nominata findvideos logger.info('[cinemalibero.py] findvideos') itemlist = [] if item.args == 'direct': return servertools.find_video_items(item) if item.contentType == 'episode': data = item.url.lower() block = scrapertools.find_single_match( data, r'>streaming.*?<\/strong>*?<\/h2>(.*?)<\/div>') urls = re.findall('<a.*?href="([^"]+)"', block, re.DOTALL) else: data = httptools.downloadpage(item.url, headers=headers).data data = re.sub(r'\n|\t', '', data).lower() block = scrapertools.find_single_match( data, r'>streaming.*?<\/strong>(.*?)<strong>') urls = re.findall('<a href="([^"]+)".*?class="external"', block, re.DOTALL) logger.info('URLS' + str(urls)) if urls: data = '' for url in urls: url, c = unshortenit.unshorten(url) data += url + '\n' logger.info('DATA' + data) itemlist = servertools.find_video_items(data=data) for videoitem in itemlist: videoitem.title = item.fulltitle + ' - [COLOR limegreen][[/COLOR]' + videoitem.title + ' [COLOR limegreen]][/COLOR]' videoitem.fulltitle = item.fulltitle videoitem.thumbnail = item.thumbnail videoitem.show = item.show videoitem.plot = item.plot videoitem.channel = item.channel videoitem.contentType = item.contentType # Link Aggiungi alla Libreria if item.contentType != 'episode': if config.get_videolibrary_support( ) and len(itemlist) > 0 and item.extra != 'findservers': itemlist.append( Item(channel=item.channel, title= '[COLOR lightblue][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action='add_pelicula_to_library', extra='findservers', contentTitle=item.contentTitle)) # Necessario per filtrare i Link if checklinks: itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) # Necessario per AutoPlay autoplay.start(itemlist, item) return itemlist