diff --git a/channels/guardaserieclick.json b/channels/guardaserieclick.json index 2fdce7ef..b91bf8f7 100644 --- a/channels/guardaserieclick.json +++ b/channels/guardaserieclick.json @@ -4,10 +4,18 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "http://www.guardaserie.click/wp-content/themes/guardaserie/images/logogd.png", - "bannermenu": "http://www.guardaserie.click/wp-content/themes/guardaserie/images/logogd.png", + "thumbnail": "guardaserieclick.png", + "bannermenu": "guardaserieclick.png", "categories": ["tvshow","anime"], "settings": [ + { + "id": "channel_host", + "type": "text", + "label": "Host del canale", + "default": "https://www.guardaserie.media", + "enabled": true, + "visible": true + }, { "id": "include_in_global_search", "type": "bool", @@ -31,6 +39,32 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "checklinks", + "type": "bool", + "label": "Verifica se i link esistono", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "checklinks_number", + "type": "list", + "label": "Numero de link da verificare", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "1", "3", "5", "10" ] + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostra link in lingua...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": ["Non filtrare","IT"] } ] } diff --git a/channels/guardaserieclick.py b/channels/guardaserieclick.py index a7387fef..28004d02 100644 --- a/channels/guardaserieclick.py +++ b/channels/guardaserieclick.py @@ -1,49 +1,56 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ -# Ringraziamo Icarus crew # Canale per guardaserie.click +# Thanks to Icarus crew & Alfa addon # ------------------------------------------------------------ import re +import channelselector from core import httptools, scrapertools, servertools, support from core import tmdb from core.item import Item from platformcode import logger, config +from specials import autoplay -host = "http://www.guardaserie.watch" +__channel__ = 'guardaserieclick' +host = config.get_setting("channel_host", __channel__) +headers = [['Referer', host]] + +IDIOMAS = {'Italiano': 'IT'} +list_language = IDIOMAS.values() +list_servers = ['speedvideo','openload'] +list_quality = ['default'] headers = [['Referer', host]] # ---------------------------------------------------------------------------------------------------------------- def mainlist(item): - logger.info("[GuardaSerieClick.py]==> mainlist") - itemlist = [Item(channel=item.channel, - action="nuoveserie", - title=support.color("Nuove serie TV", "orange"), - url="%s/lista-serie-tv" % 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, - action="serietvaggiornate", - title=support.color("Serie TV Aggiornate", "azure"), - url="%s/lista-serie-tv" % 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, - action="lista_serie", - title=support.color("Anime", "azure"), - url="%s/category/animazione/" % 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, - action="categorie", - title=support.color("Categorie", "azure"), - url=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, - action="search", - title=support.color("Cerca ...", "yellow"), - extra="serie", - thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] + support.log(item.channel+" mainlist") + + itemlist = [] + # support.menu(itemlist, 'Serie TV bold') + support.menu(itemlist, 'Novità bold', 'serietvaggiornate', "%s/lista-serie-tv" % host,'tvshow') + support.menu(itemlist, 'Nuove serie', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow') + support.menu(itemlist, 'Serie inedite Sub-ITA', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['inedite']) + support.menu(itemlist, 'Da non perdere bold', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['tv','da non perdere']) + support.menu(itemlist, 'Classiche bold', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['tv','classiche']) + support.menu(itemlist, 'Anime', 'lista_serie', "%s/category/animazione/" % host,'tvshow') + support.menu(itemlist, 'Categorie', 'categorie', host,'tvshow',args=['serie']) + support.menu(itemlist, 'Cerca', 'search', host,'tvshow',args=['serie']) + + autoplay.init(item.channel, list_servers, list_quality) + autoplay.show_option(item.channel, itemlist) + + itemlist.append( + Item(channel='setting', + action="channel_config", + title=support.typo("Configurazione Canale color lime"), + config=item.channel, + folder=False, + thumbnail=channelselector.get_thumb('setting_0.png')) + ) return itemlist @@ -52,7 +59,7 @@ def mainlist(item): # ---------------------------------------------------------------------------------------------------------------- def newest(categoria): - logger.info("[GuardaSerieClick.py]==> newest" + categoria) + support.log(__channel__+" newest" + categoria) itemlist = [] item = Item() try: @@ -78,7 +85,7 @@ def newest(categoria): # ---------------------------------------------------------------------------------------------------------------- def search(item, texto): - logger.info("[GuardaSerieClick.py]==> search") + support.log(item.channel+" search") item.url = host + "/?s=" + texto try: return lista_serie(item) @@ -91,29 +98,44 @@ def search(item, texto): # ================================================================================================================ +# ---------------------------------------------------------------------------------------------------------------- +def cleantitle(scrapedtitle): + scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()).replace('"',"'") + return scrapedtitle.strip() + + +# ================================================================================================================ # ---------------------------------------------------------------------------------------------------------------- def nuoveserie(item): - logger.info("[GuardaSerieClick.py]==> nuoveserie") + support.log(item.channel+" nuoveserie") itemlist = [] - data = httptools.downloadpage(item.url, headers=headers).data - blocco = scrapertools.find_single_match(data, '
]+>([^<]+)<[^>]+>[^>]+>[^>]+>'
+ patron += r'[^<]+[^"]+".*?serie="([^"]+)".*?stag="([0-9]*)".*?ep="([0-9]*)"\s*'
+ patron += r'.*?embed="([^"]+)"\s*.*?embed2="([^"]+)?"\s*.*?embed3="([^"]+)?"?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*'
+ patron += r'(?:]+>|
]+>)?'
+ # matches = re.compile(patron, re.DOTALL).findall(data)
- if config.get_videolibrary_support() and len(itemlist) != 0:
+ # logger.debug(matches)
+
+ matches = support.match(item, patron, headers=headers)[0]
+
+
+ for scrapedtitle, scrapedepisodetitle, scrapedplot, scrapedserie, scrapedseason, scrapedepisode, scrapedurl, scrapedurl2,scrapedurl3,scrapedthumbnail,scrapedthumbnail2 in matches:
+ scrapedtitle = cleantitle(scrapedtitle)
+ scrapedepisode = scrapedepisode.zfill(2)
+ scrapedepisodetitle = cleantitle(scrapedepisodetitle)
+ title = str("%sx%s %s" % (scrapedseason, scrapedepisode, scrapedepisodetitle)).strip()
+ if 'SUB-ITA' in scrapedtitle:
+ title +=" Sub-ITA"
+
+ infoLabels = {}
+ infoLabels['season'] = scrapedseason
+ infoLabels['episode'] = scrapedepisode
itemlist.append(
- Item(channel=item.channel,
- title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
- url=item.url,
- action="add_serie_to_library",
- extra="episodi",
- show=item.show))
+ Item(channel=item.channel,
+ action="findvideos",
+ title=title,
+ fulltitle=scrapedtitle,
+ url=scrapedurl+"\r\n"+scrapedurl2+"\r\n"+scrapedurl3,
+ contentType="episode",
+ plot=scrapedplot,
+ contentSerieName=scrapedserie,
+ contentLanguage='Sub-ITA' if 'Sub-ITA' in title else '',
+ infoLabels=infoLabels,
+ thumbnail=scrapedthumbnail2 if scrapedthumbnail2 != '' else scrapedthumbnail,
+ folder=True))
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ support.videolibrary(itemlist, item)
return itemlist
@@ -256,20 +315,12 @@ def episodi(item):
# ----------------------------------------------------------------------------------------------------------------
def findepvideos(item):
- logger.info("[GuardaSerieClick.py]==> findepvideos")
-
+ support.log(item.channel+" findepvideos")
data = httptools.downloadpage(item.url, headers=headers).data
- data = scrapertools.find_single_match(data, item.extra)
- itemlist = servertools.find_video_items(data=data)
-
- for videoitem in itemlist:
- server = re.sub(r'[-\[\]\s]+', '', videoitem.title).capitalize()
- videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
+ matches = scrapertools.find_multiple_matches(data, item.extra)
+ data = "\r\n".join(matches[0])
+ item.contentType = 'movie'
+ itemlist = support.server(item, data=data)
return itemlist
@@ -278,17 +329,8 @@ def findepvideos(item):
# ----------------------------------------------------------------------------------------------------------------
def findvideos(item):
- logger.info("[GuardaSerieClick.py]==> findvideos")
-
- itemlist = servertools.find_video_items(data=item.url)
-
- for videoitem in itemlist:
- server = re.sub(r'[-\[\]\s]+', '', videoitem.title).capitalize()
- videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
+ support.log(item.channel+" findvideos")
+ logger.debug(item.url)
+ itemlist = support.server(item, data=item.url)
return itemlist
diff --git a/resources/media/channels/banner/guardaserieclick.png b/resources/media/channels/banner/guardaserieclick.png
new file mode 100644
index 00000000..9f5e34b3
Binary files /dev/null and b/resources/media/channels/banner/guardaserieclick.png differ
diff --git a/resources/media/channels/thumb/guardaserieclick.png b/resources/media/channels/thumb/guardaserieclick.png
new file mode 100644
index 00000000..eee22552
Binary files /dev/null and b/resources/media/channels/thumb/guardaserieclick.png differ