From df893e17ff3bd301aa00dd42556a530db25192d5 Mon Sep 17 00:00:00 2001 From: greko <50103632+greko17@users.noreply.github.com> Date: Wed, 10 Jul 2019 11:55:11 +0200 Subject: [PATCH] fix per bit.ly e fix di alcuni canali --- channels/altadefinizione01_club.json | 16 +++ channels/altadefinizione01_club.py | 189 +++++++-------------------- channels/animesubita.py | 2 +- channels/cinetecadibologna.py | 3 +- channels/filmpertutti.json | 2 +- channels/guardarefilm.py | 2 +- channels/istitutoluce.py | 3 +- channels/italiaserie.py | 6 +- core/support.py | 4 +- servers/decrypters/zcrypt.py | 3 +- 10 files changed, 76 insertions(+), 154 deletions(-) diff --git a/channels/altadefinizione01_club.json b/channels/altadefinizione01_club.json index 7dc55b71..8c6aa266 100644 --- a/channels/altadefinizione01_club.json +++ b/channels/altadefinizione01_club.json @@ -11,6 +11,14 @@ "movie" ], "settings": [ + { + "id": "channel_host", + "type": "text", + "label": "Host del canale", + "default": "https://altadefinizione01.estate/", + "enabled": true, + "visible": true + }, { "id": "modo_grafico", "type": "bool", @@ -19,6 +27,14 @@ "enabled": true, "visible": true }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "Includi in Novità - Film", + "default": true, + "enabled": true, + "visible": true + }, { "id": "include_in_newest_film", "type": "bool", diff --git a/channels/altadefinizione01_club.py b/channels/altadefinizione01_club.py index 47acc6d8..2895bb93 100644 --- a/channels/altadefinizione01_club.py +++ b/channels/altadefinizione01_club.py @@ -5,11 +5,10 @@ # -*- last change: 04/05/2019 -from channelselector import get_thumb -from core import httptools, channeltools, scrapertools, servertools, tmdb, support +from core import channeltools, servertools, support from core.item import Item from platformcode import config, logger -from specials import autoplay, filtertools +from specials import autoplay __channel__ = "altadefinizione01_club" host = config.get_channel_url(__channel__) @@ -28,8 +27,8 @@ thumbnail_host = parameters['thumbnail'] IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() -list_servers = ['verystream','openload','rapidvideo','streamango'] # per l'autoplay -list_quality = ['default'] #'rapidvideo', 'streamango', 'openload', 'streamcherry'] # per l'autoplay +list_servers = ['verystream','openload','supervideo','rapidvideo','streamango'] # per l'autoplay +list_quality = ['default'] # =========== home menu =================== @@ -43,8 +42,6 @@ def mainlist(item): logger.info("%s mainlist log: %s" % (__channel__, item)) itemlist = [] - autoplay.init(item.channel, list_servers, list_quality) - # Menu Principale support.menu(itemlist, 'Film Ultimi Arrivi bold', 'peliculas', host, args='pellicola') support.menu(itemlist, 'Genere', 'categorie', host, args='genres') @@ -52,9 +49,12 @@ def mainlist(item): support.menu(itemlist, 'Per lettera', 'categorie', host + '/catalog/a/', args=['Film per Lettera','orderalf']) support.menu(itemlist, 'Al Cinema bold', 'peliculas', host + '/cinema/', args='pellicola') support.menu(itemlist, 'Sub-ITA bold', 'peliculas', host + '/sub-ita/', args='pellicola') - support.menu(itemlist, 'Cerca film submenu', 'search', host) + support.menu(itemlist, 'Cerca film submenu', 'search', host, args = 'search') + autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) + + support.channel_config(item, itemlist) return itemlist @@ -64,43 +64,19 @@ def mainlist(item): def peliculas(item): logger.info("%s mainlist peliculas log: %s" % (__channel__, item)) itemlist = [] - # scarico la pagina - data = httptools.downloadpage(item.url, headers=headers).data - # da qui fare le opportuni modifiche - if item.args != 'orderalf': - if item.args == 'pellicola' or item.args == 'years': - bloque = scrapertools.find_single_match(data, '
(.*?)
' - # poichè il sito ha l'anno del film con TMDB la ricerca titolo-anno è esatta quindi inutile fare lo scrap delle locandine - # e della trama dal sito che a volte toppano - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + listGroups = ['url', 'thumb', 'lang', 'title', 'year'] - # Paginazione - support.nextPage(itemlist,item,data,'[^<]+[^<]+') + patronNext = '[^<]+[^<]+' + + itemlist = support.scrape(item, patron=patron, listGroups=listGroups, + headers= headers, patronNext=patronNext,patron_block=patron_block, + action='findvideos') return itemlist @@ -109,39 +85,25 @@ def peliculas(item): def categorie(item): logger.info("%s mainlist categorie log: %s" % (__channel__, item)) itemlist = [] - # scarico la pagina - data = httptools.downloadpage(item.url, headers=headers).data # da qui fare le opportuni modifiche + patron = r'') end = html.find('
', start) scrapedplot = html[start:end] diff --git a/channels/italiaserie.py b/channels/italiaserie.py index 98dc22de..e31efa2f 100644 --- a/channels/italiaserie.py +++ b/channels/italiaserie.py @@ -4,14 +4,14 @@ # ------------------------------------------------------------ import re -import autoplay -import support -from core import httptools, scrapertools + +from core import httptools, scrapertools, support from core import tmdb from core.item import Item from platformcode import logger from platformcode import config +from specials import autoplay __channel__ = 'italiaserie' host = config.get_channel_url(__channel__) diff --git a/core/support.py b/core/support.py index 6f066abd..ee2326d8 100644 --- a/core/support.py +++ b/core/support.py @@ -178,7 +178,9 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="" longtitle = longtitle + typo(title2, 'bold _ -- _') ## Aggiunto/modificato per gestire i siti che hanno i video - ## in ita e subita delle serie tv nella stessa pagina + ## in ita e subita delle serie tv nella stessa pagina + if scraped['lang'] == '': #altrimenti nei canali dei film mi aggiunge sub-ita a tutti i film successivi + lang = '' # o in alternativa lang = 'ITA' if scraped['lang']: if 'sub' in scraped['lang'].lower(): lang = 'Sub-ITA' diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index 3379cd75..50e2cb82 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -19,7 +19,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= patronvideos = [ r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)', - r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)' + r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)', + r'(https?://(?:www\.)?(bit)\.ly/[a-zA-Z0-9]+)', ] for patron in patronvideos: