From 7374c9639e147ff3b7ceba7de52d4afdf2473f01 Mon Sep 17 00:00:00 2001 From: marco Date: Fri, 1 May 2020 20:35:39 +0200 Subject: [PATCH] cb01 supporto alle cartelle vcrypt --- channels/cineblog01.py | 55 +++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index fdc50de4..d64cb0d6 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -137,32 +137,47 @@ def peliculas(item): @support.scrape def episodios(item): - patronBlock = r'(?P
\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P[^-<]+)(?:- (?P[^-<]+))?.*?[^<>]*?<\/div>.*?)
\[riduci\]<\/div>' - patron = r'(?:/>|

|)(?P.*?(?P[0-9]+(?:×|×)[0-9]+)\s*(?P.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|\s+<', '> <', data) + if 'TUTTA LA ' in data: + folderUrl = scrapertools.find_single_match(data, 'TUTTA LA \w+\s+(?:–|-)\s+]+>(?P[^<]+)' + sceneTitle = True + def itemHook(item): + item.serieFolder = True + return item + else: + patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?<\/div>.*?)<div class="spdiv">\[riduci\]<\/div>' + patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|×)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)' + def itemlistHook(itemlist): + title_dict = {} + itlist = [] + for item in itemlist: + item.title = re.sub(r'\.(\D)',' \\1', item.title) + match = support.match(item.title, patron=r'(\d+.\d+)').match.replace('x','') + item.order = match + if match not in title_dict: + title_dict[match] = item + elif match in title_dict and item.contentLanguage == title_dict[match].contentLanguage \ + or item.contentLanguage == 'ITA' and not title_dict[match].contentLanguage \ + or title_dict[match].contentLanguage == 'ITA' and not item.contentLanguage: + title_dict[match].url = item.url + else: + title_dict[match + '1'] = item - for key, value in title_dict.items(): - itlist.append(value) + for key, value in title_dict.items(): + itlist.append(value) - return sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order))) + return sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order))) return locals() def findvideos(item): + if item.serieFolder: + return support.server(item, data=item.url) if item.contentType == "episode": return findvid_serie(item)