From 527cfa86d70b2025d820637a1525b58a7f6ee4c4 Mon Sep 17 00:00:00 2001 From: enricodarodda <57716112+enricodarodda@users.noreply.github.com> Date: Wed, 27 Jan 2021 21:14:21 +0100 Subject: [PATCH 1/6] Fix altadefinizione, cinemalibero, eurostreaming, ilgeniodellostreaming, casacinema e default.py (#260) * Fix altadefinizione, cinemalibero, eurostreaming, ilgeniodellostreaming e default.py * Fix altadefinizione e Casacinema Co-authored-by: mac12m99 <10120390+mac12m99@users.noreply.github.com> --- channels/altadefinizioneclick.py | 3 ++- channels/casacinema.py | 4 ++-- channels/cinemalibero.py | 2 +- channels/ilgeniodellostreaming.py | 3 ++- default.py | 5 ++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index 7b142536..5b363e22 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -72,6 +72,7 @@ def peliculas(item): @support.scrape def genres(item): + # debugBlock=True action = 'peliculas' patronMenu = r'
  • (?P[^<]+)<' @@ -80,7 +81,7 @@ def genres(item): elif item.args == 'years': patronBlock = r'<ul class="listSubCat" id="Anno">(?P<block>.*)<ul class="listSubCat" id="Qualita">' elif item.args == 'quality': - patronBlock = r'<ul class="listSubCat" id="Qualita">(?P<block>.*)</li> </ul> </div> </div> </div> <a' + patronBlock = r'<ul class="listSubCat" id="Qualita">(?P<block>.*)</li>\s*?</ul>\s*?</div>\s*?</div>\s*?</div>\s*?<a' elif item.args == 'lucky': # sono i titoli random nella pagina patronBlock = r'<h3 class="titleSidebox dado">FILM RANDOM</h3>(?P<block>.*)</section>' patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<[]+)(?:\[(?P<lang>.+?)\])?<' diff --git a/channels/casacinema.py b/channels/casacinema.py index 375d4ff7..864f4822 100644 --- a/channels/casacinema.py +++ b/channels/casacinema.py @@ -104,9 +104,9 @@ def peliculas(item): action = 'select' if item.args == 'newest': - patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s+<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?' + patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?' else: - patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s+<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?' + patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?' patronNext = r'<a href="([^"]+)" >Pagina' # debug = True diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index 065a91ca..dcd79468 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -59,7 +59,7 @@ def peliculas(item): patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})))/".+?url\((?P<thumb>[^\)]+)\)">' elif item.contentType == 'tvshow': if item.args == 'update': - patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s+<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ](?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)' + patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s*?<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>\s*?(?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)' pagination = 25 else: patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>[^"\(]+)(?:"|\()(?:(?P<year>\d+)[^"]+)?.*?url\((?P<thumb>[^\)]+)\)(?:.*?<div class="voto">[^>]+>[^>]+>\s*(?P<rating>[^<]+))?.*?<div class="titolo">[^>]+>(?:<div class="genere">[^ ]*(?:\s\d+)?\s*(?:\()?(?P<lang>[^\)< ]+))?' diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index 1baa525f..d2642049 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -48,6 +48,7 @@ def mainlist(item): def peliculas(item): info() # debugBlock = True + # debug=True if item.args == 'search': patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">' @@ -85,7 +86,7 @@ def peliculas(item): item.contentType = 'episode' return item else: - patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>(?P<year>[0-9]{4})?[^<]*(?:<.*?<div class="texto">(?P<plot>[^<]+))?' + patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>(?P<year>[0-9]{4})?[^<]*(?:<.*?<div class="texto">(?P<plot>[^<]+)?)?' patronNext = '<span class="current">[^<]+<[^>]+><a href=[\'"]([^\'"]+)[\'"]' #support.regexDbg(item, patron, headers) diff --git a/default.py b/default.py index a8ccc0bb..eb72aed5 100644 --- a/default.py +++ b/default.py @@ -27,6 +27,5 @@ from platformcode import launcher if sys.argv[2] == "": launcher.start() - launcher.run() -else: - launcher.run() + +launcher.run() From 95c0688c634c717c1208e87415cbd9d01a6542f6 Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Thu, 28 Jan 2021 11:27:32 +0100 Subject: [PATCH 2/6] Fix Titolo Community Channels --- core/support.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/support.py b/core/support.py index 92eb46d4..d16067a6 100755 --- a/core/support.py +++ b/core/support.py @@ -1183,7 +1183,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru srv_param = servertools.get_server_parameters(videoitem.server.lower()) if videoitem.video_urls or srv_param.get('active', False): - item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title + if item.channel == 'community': + item.title = item.fulltitle + else: + item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title quality = videoitem.quality if videoitem.quality else item.quality if item.quality else '' videoitem.title = (item.title if item.channel not in ['url'] else '') + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "") @@ -1207,7 +1210,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru # for it in thL: # if it and not config.get_setting("black_list", server=it.server.lower()): # verifiedItemlist.append(it) - + with futures.ThreadPoolExecutor() as executor: thL = [executor.submit(getItem, videoitem) for videoitem in itemlist if videoitem.url or videoitem.video_urls] for it in futures.as_completed(thL): From bb767470a8e3e748b7c49db60cb6a2d6f4941461 Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Thu, 28 Jan 2021 12:07:12 +0100 Subject: [PATCH 3/6] Fix Community Channels --- core/support.py | 6 ++---- specials/community.py | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/support.py b/core/support.py index d16067a6..8a2e555e 100755 --- a/core/support.py +++ b/core/support.py @@ -1151,6 +1151,7 @@ def pagination(itemlist, item, page, perpage, function_level=1): def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, Download=True, patronTag=None, Videolibrary=True): logger.debug() + if not data and not itemlist: data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data if data: @@ -1183,10 +1184,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru srv_param = servertools.get_server_parameters(videoitem.server.lower()) if videoitem.video_urls or srv_param.get('active', False): - if item.channel == 'community': - item.title = item.fulltitle - else: - item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title + item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title quality = videoitem.quality if videoitem.quality else item.quality if item.quality else '' videoitem.title = (item.title if item.channel not in ['url'] else '') + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "") diff --git a/specials/community.py b/specials/community.py index 1dca0fb1..4bc98a90 100644 --- a/specials/community.py +++ b/specials/community.py @@ -394,6 +394,7 @@ def episodios(item, json ='', key='', itemlist =[]): # Find Servers def findvideos(item): + item.contentTitle = item.fulltitle logger.debug() itemlist = [] if 'links' in item.url: @@ -406,7 +407,7 @@ def findvideos(item): title = set_title(title, extra.language, extra.quality) itemlist.append(Item(channel=item.channel, title=title, url=option['url'], action='play', quality=extra.quality, - language=extra.language, infoLabels = item.infoLabels)) + language=extra.language, infoLabels = item.infoLabels, contentTitle=item.fulltitle)) return support.server(item, itemlist=itemlist) From 9e83b9aaa9d8476556fed92ea8eea303a0f8a561 Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Thu, 28 Jan 2021 12:13:58 +0100 Subject: [PATCH 4/6] ops --- specials/community.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specials/community.py b/specials/community.py index 4bc98a90..70726072 100644 --- a/specials/community.py +++ b/specials/community.py @@ -406,8 +406,8 @@ def findvideos(item): title = item.fulltitle + (' - '+option['title'] if 'title' in option else '') title = set_title(title, extra.language, extra.quality) - itemlist.append(Item(channel=item.channel, title=title, url=option['url'], action='play', quality=extra.quality, - language=extra.language, infoLabels = item.infoLabels, contentTitle=item.fulltitle)) + itemlist.append(item.clone(channel=item.channel, title=title, url=option['url'], action='play', quality=extra.quality, + language=extra.language, infoLabels = item.infoLabels)) return support.server(item, itemlist=itemlist) From 4b926ff4b398ad02209e48d308ab7f02fd7647db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Jan 2021 18:07:07 +0000 Subject: [PATCH 5/6] {Aggiornamento domini} --- channels.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels.json b/channels.json index 435724d2..5f977d90 100644 --- a/channels.json +++ b/channels.json @@ -1,6 +1,6 @@ { "direct": { - "altadefinizione01_link": "https://altadefinizione01.tips", + "altadefinizione01_link": "https://altadefinizione01.market", "animealtadefinizione": "https://www.animealtadefinizione.it", "animeforce": "https://www.animeforce.it", "animeleggendari": "https://animeora.com", From 37403795ff83c5951ea0ad9e536949c95ca8dd86 Mon Sep 17 00:00:00 2001 From: enricodarodda <57716112+enricodarodda@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:46:22 +0100 Subject: [PATCH 6/6] Fix seriehd and serietvu (#261) Migliorie seriehd and serietvu --- channels/seriehd.py | 6 +++--- channels/serietvu.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/channels/seriehd.py b/channels/seriehd.py index 55b3c64b..735c7da0 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -69,13 +69,13 @@ def peliculas(item): if item.args == 'last': action = 'findvideos' - patron = r'singleUpdate">[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>\s*<h2>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>\s*(?P<season>\d+)\D+(?P<episode>\d+)(?:[^\(]*\()?(?P<lang>[^\)]+)?(?:\))?' + patron = r'singleUpdate">(?:[^>]+>){2}\s*<img src="(?P<thumb>[^"]+)"(?:[^>]+>){3}\s*<h2>(?P<title>[^<]+)<(?:[^>]+>){16}\s*<a href="(?P<url>[^"]+)">(?:[^>]+>){3}\s*(?P<season>\d+)\D+(?P<episode>\d+)(?:[^\(]*\()?(?P<lang>[^\)]+)?(?:\))?' elif item.args == 'best': action='episodios' - patron = r'col-md-3">\s*<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoVetrina">[^>]+>(?P<year>\d{4})[^>]+>[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"' + patron = r'col-md-3">\s*<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoVetrina">[^>]+>(?P<year>\d{4})(?:[^>]+>){2}(?P<title>[^<]+)<(?:[^>]+>){4}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)"' else: action='episodios' - patron = r'<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoSeries">\s*<h2>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)?[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>(?P<year>\d{4})' + patron = r'<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoSeries">\s*<h2>(?P<title>[^<]+)<(?:[^>]+>){5}(?P<rating>[^<]+)?(?:[^>]+>){3}\s*<img src="(?P<thumb>[^"]+)"(?:[^>]+>){3}(?P<quality>[^<]+)<(?:[^>]+>){2}(?P<year>\d{4})' patronNext=r'next page-numbers" href="([^"]+)"' return locals() diff --git a/channels/serietvu.py b/channels/serietvu.py index 446b12c5..e0c68d55 100644 --- a/channels/serietvu.py +++ b/channels/serietvu.py @@ -33,14 +33,15 @@ def mainlist(item): @support.scrape def peliculas(item): + # debug=True patronBlock = r'<div class="wrap">\s*<h.>.*?</h.>(?P<block>.*?)<footer>' if item.args != 'update': action = 'episodios' - patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<' + patron = r'<div class="item">\s*?<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">(?:[^>]+>){4}(?P<title>[^<]+)<' else: action = 'findvideos' - patron = r'<div class="item">\s+?<a href="(?P<url>[^"]+)"\s+?data-original="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)<[^>]+>\((?P<episode>[\dx\-]+)\s+?(?P<lang>Sub-Ita|[iITtAa]+)\)<' + patron = r'<div class="item">\s*?<a href="(?P<url>[^"]+)"\s*?data-original="(?P<thumb>[^"]+)"(?:[^>]+>){5}(?P<title>.+?)<[^>]+>\((?P<episode>[\dx\-]+)\s+?(?P<lang>Sub-Ita|[iITtAa]+)\)<' pagination = 25 patronNext = r'<li><a href="([^"]+)"\s+?>Pagina successiva'