From 52c74d38527f9f5f74a9a757e70dfa4ff276925d Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 29 Sep 2021 16:34:36 +0200 Subject: [PATCH] Fix Altadefinizione Click --- channels/altadefinizionecommunity.py | 12 ++++++------ core/support.py | 8 ++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/channels/altadefinizionecommunity.py b/channels/altadefinizionecommunity.py index 09682770..b1188f83 100644 --- a/channels/altadefinizionecommunity.py +++ b/channels/altadefinizionecommunity.py @@ -185,8 +185,8 @@ def search(item, texto): def genres(item): logger.debug(item) data = support.httptools.downloadpage(item.url, cloudscraper=True).data - - patronMenu = r'(?P[^<]+)' + blacklist = ['Film', 'Serie TV', 'Trovatore', 'Lista A-Z'] + patronGenreMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)' if item.args == 'quality': item.contentType = 'undefined' patronBlock = r'Risoluzione(?P<block>.*?)</ul>' @@ -207,14 +207,14 @@ def genres(item): @support.scrape def episodios(item): - logger.debug(item) + logger.debug() data = item.data - patron = r'class="playtvshow " data-href="(?P<url>[^"]+)' + patron = r'class="playtvshow "\s*data-href="(?P<url>[^"]+)' def itemHook(it): spl = it.url.split('/')[-2:] - it.infoLabels['season'] = int(spl[0])+1 - it.infoLabels['episode'] = int(spl[1])+1 + it.contentSeason = int(spl[0])+1 + it.contentEpisodeNumber = int(spl[1])+1 it.url = it.url.replace('/watch-unsubscribed', '/watch-external') return it diff --git a/core/support.py b/core/support.py index 107332ba..e951267b 100755 --- a/core/support.py +++ b/core/support.py @@ -1401,7 +1401,7 @@ def thumb(data=None, mode=None): _thriller = ['thriller'] _western = ['western'] _romance = ['romantico', 'sentimentale', 'romance', 'soap'] - _family = ['famiglia','famiglie', 'family'] + _family = ['famiglia','famiglie', 'familiare', 'family'] _historical = ['storia', 'storico', 'history', 'historical'] _setting = ['impostazioni', 'settaggi', 'configura', 'configurare', 'gestire', 'gestisci', 'gestione', 'setting', 'config'] _talk = ['talk'] @@ -1415,6 +1415,7 @@ def thumb(data=None, mode=None): _fhd = ['fullhd'] _2k = ['2k'] _4k = ['4k'] + _short = ['corto','short'] main_dict = {'movie':_movie, 'tvshow':_tvshow, @@ -1478,7 +1479,10 @@ def thumb(data=None, mode=None): 'news':_news, 'talk':_talk, 'reality':_reality, - 'tvmovie':_movie} + 'tvmovie':_movie, + 'sub':_sub, + 'cinema':_cinema, + 'short':_short} search = ['cerca', 'cercare', 'ricerca', 'ricercare', 'trova', 'trovare', 'search', 'searching', 'find', 'finding']