From 32b9b39b298c4cfaf75fe60d45d7194a62e4f35d Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 14 Jun 2020 19:55:39 +0200 Subject: [PATCH] fix vari --- channels/animesaturn.py | 6 ++++-- channels/animeworld.py | 11 +++++------ channels/eurostreaming.py | 10 ++-------- channels/ilgeniodellostreaming.py | 6 +----- channels/serietvonline.py | 2 +- channels/tantifilm.py | 4 ++-- 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/channels/animesaturn.py b/channels/animesaturn.py index 55a297d1..a3a41703 100644 --- a/channels/animesaturn.py +++ b/channels/animesaturn.py @@ -26,9 +26,10 @@ def mainlist(item): @support.scrape def search(item, texto): search = texto + # debug = True item.contentType = 'tvshow' anime = True - patron = r']+> (?P[^<\(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?' + patron = r'href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</a>.*?<p[^>]+>(?P<plot>[^<]+).*?<img src="(?P<thumbnail>[^"]+)' action = 'check' return locals() @@ -62,6 +63,7 @@ def menu(item): @support.scrape def peliculas(item): anime = True + # debug = True deflang= 'Sub-ITA' action = 'check' @@ -97,7 +99,7 @@ def peliculas(item): if item.args == 'incorso': patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<' else: - patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>' + patron = r'href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</a>.*?<p[^>]+>(?P<plot>[^<]+).*?<img src="(?P<thumbnail>[^"]+)' return locals() diff --git a/channels/animeworld.py b/channels/animeworld.py index 85118054..72de97ee 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -3,7 +3,7 @@ # Canale per animeworld # ---------------------------------------------------------- -from core import support, jsontools +from core import support, jsontools host = support.config.get_channel_url() headers = [['Referer', host]] @@ -11,9 +11,6 @@ headers = [['Referer', host]] __channel__ = 'animeworld' - - - def order(): # Seleziona l'ordinamento dei risultati return str(support.config.get_setting("order", __channel__)) @@ -35,6 +32,7 @@ def genres(item): action = 'peliculas' patronBlock = r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> Generi <span.[^>]+>(?P<block>.*?)</ul>' patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>' + def itemHook(item): item.url = host + '/filter?' + item.name + '=' + item.value + '&sort=' return item @@ -45,7 +43,8 @@ def genres(item): def menu(item): action = 'submenu' patronBlock=r'<form class="filters.*?>(?P<block>.*?)</form>' - patronMenu=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (?P<title>.*?) <span.[^>]+>(?P<url>.*?)</ul>' + patronMenu=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (?P<title>.*?) <span.[^>]+>(?P<other>.*?)</ul>' + def itemlistHook(itemlist): item.title = support.typo('Tutti','bold') item.action = 'peliculas' @@ -57,7 +56,7 @@ def menu(item): @support.scrape def submenu(item): action = 'peliculas' - data = item.url + data = item.other patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>' def itemHook(item): item.url = host + '/filter?' + item.name + '=' + item.value + '&language[]=' + item.args + '&sort=' diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index f0696e05..c691cd82 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -15,15 +15,9 @@ def findhost(): host = support.config.get_channel_url(findhost) headers = [['Referer', host]] - - - - @support.menu def mainlist(item): support.log() - - tvshow = [] anime = ['/category/anime-cartoni-animati/'] mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']), @@ -37,7 +31,7 @@ def mainlist(item): def peliculas(item): action = 'episodios' if item.args == 'newest': - patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?)[^–â][\s]*<a href="(?P<url>[^"]+)"[^>]*> ?(?P<episode>\d+x\d+-\d+|\d+x\d+) .*?[ ]?\(?(?P<lang>SUB ITA)?\)?</a>' + patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+)–\s*<a href="(?P<url>[^"]+)"[^>]*>\s?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>' pagination = '' else: patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>' @@ -55,7 +49,7 @@ def episodios(item): def itemHook(item): if not item.url: - item.url ='' + item.url = '' return item return locals() diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index da3920d5..d061cd96 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -7,16 +7,12 @@ import re -from core import scrapertools, httptools, support +from core import support from core.support import log from core.item import Item from platformcode import config host = config.get_channel_url() - - - - headers = [['Referer', host]] @support.menu diff --git a/channels/serietvonline.py b/channels/serietvonline.py index 9b5977b3..5e0a7c80 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -88,7 +88,7 @@ def peliculas(item): pagination = 25 if item.args == 'lista': - patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?(?: Streaming | MD iSTANCE )?<' + patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)(?P<year>\d{4})?<' patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">' else: patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' diff --git a/channels/tantifilm.py b/channels/tantifilm.py index 9dc6b27e..b3e74a67 100644 --- a/channels/tantifilm.py +++ b/channels/tantifilm.py @@ -58,13 +58,13 @@ def peliculas(item): # support.regexDbg(item, patron, headers) else: patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">' - patron = r'<div class="mediaWrap mediaWrapAlt">\s?<a href="(?P<url>[^"]+)"(?:[^>]+>|)>?\s?<img[^s]+src="([^"]+)"[^>]+>\s?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]<lang>[sSuUbB\-iItTaA]+)?(?:[ ]?\((?P<year>\d+)[\-\d+]+)\).[^<]+[^>]+><\/a>.+?<p>\s*(?P<quality>[a-zA-Z-0-9\.]+)\s*<\/p>[^>]+>' + patron = r'<div class="mediaWrap mediaWrapAlt">\s?<a href="(?P<url>[^"]+)"(?:[^>]+>|)>?\s?<img[^s]+src="([^"]+)"[^>]+>\s?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]<lang>[sSuUbB\-iItTaA]+)?(?:[ ]?\((?P<year>\d{4}))\).[^<]+[^>]+><\/a>.+?<p>\s*(?P<quality>[a-zA-Z-0-9\.]+)\s*<\/p>[^>]+>' patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->' # if item.args != 'all' and item.args != 'search': # action = 'findvideos' if item.extra == 'movie' else 'episodios' # item.contentType = 'movie' if item.extra == 'movie' else 'tvshow' - #debug = True + # debug = True return locals()