# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Ringraziamo Icarus crew # Canale per eurostreaming # ------------------------------------------------------------ import re, urlparse from channels import autoplay from core import scrapertools, httptools, servertools, tmdb, scrapertoolsV2 from core.item import Item from lib import unshortenit from platformcode import logger, config host = "https://eurostreaming.one" list_servers = ['openload', 'speedvideo', 'wstream', 'streamango' 'flashx', 'nowvideo'] list_quality = ['default'] def mainlist(item): logger.info("kod.eurostreaming mainlist") autoplay.init(item.channel, list_servers, list_quality) itemlist = [ Item( channel=item.channel, title="[COLOR azure]Serie TV[/COLOR]", action="serietv", extra="tvshow", url="%s/category/serie-tv-archive/" % host, thumbnail= "http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png" ), Item( channel=item.channel, title="[COLOR azure]Anime / Cartoni[/COLOR]", action="serietv", extra="tvshow", url="%s/category/anime-cartoni-animati/" % host, thumbnail= "http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png" ), Item( channel=item.channel, title="[COLOR yellow]Cerca...[/COLOR]", action="search", extra="tvshow", thumbnail= "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search") ] autoplay.show_option(item.channel, itemlist) return itemlist def serietv(item): logger.info("kod.eurostreaming peliculas") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url).data # Estrae i contenuti patron = '
\s*\s* 0: scrapedurl = urlparse.urljoin(item.url, matches[0]) itemlist.append( Item( channel=item.channel, action="serietv", title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]", url=scrapedurl, thumbnail= "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png", extra=item.extra, folder=True)) return itemlist def search(item, texto): logger.info("[eurostreaming.py] " + item.url + " search " + texto) item.url = "%s/?s=%s" % (host, texto) try: return serietv(item) # Continua la ricerca in caso di errore except: import sys for line in sys.exc_info(): logger.error("%s" % line) return [] def episodios(item): def load_episodios(html, item, itemlist, lang_title): patron = '((?:.*?]+>[^<][^<]+<(?:b|\/)[^>]+>)+)' matches = re.compile(patron).findall(html) for data in matches: # Estrazione scrapedtitle = data.split(']*>', '', scrapedtitle).strip() if scrapedtitle != 'Categorie': scrapedtitle = scrapedtitle.replace('×', 'x') scrapedtitle = scrapedtitle.replace('×', 'x') itemlist.append( Item(channel=item.channel, action="findvideos", contentType="episode", title="[COLOR azure]%s[/COLOR]" % (scrapedtitle + " (" + lang_title + ")"), url=data, thumbnail=item.thumbnail, extra=item.extra, fulltitle=scrapedtitle + " (" + lang_title + ")" + ' - ' + item.show, show=item.show)) logger.info("[eurostreaming.py] episodios") itemlist = [] # Download pagina data = httptools.downloadpage(item.url).data data = scrapertools.decodeHtmlentities(data) link = False if scrapertoolsV2.get_match(data, '
.*?var nano_ajax_object =.*?"go_to":"(.*?)"').replace('\\', '') link = True else: match = scrapertoolsV2.get_match(data, '

.*?.{0,5}

') if match != '': item.url = match link = True if link: data = httptools.downloadpage(item.url).data data = scrapertools.decodeHtmlentities(data) data = scrapertoolsV2.get_match(data, '