From 7cacbf1b228c99a4ca1e5a137d5d1e7798b0c177 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 14 Dec 2022 11:13:07 +0100 Subject: [PATCH] Fix Casacinema --- channels/casacinema.py | 21 ++++++--------------- lib/unshortenit.py | 4 ++-- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/channels/casacinema.py b/channels/casacinema.py index c3f41b7a..8bec8591 100644 --- a/channels/casacinema.py +++ b/channels/casacinema.py @@ -93,7 +93,6 @@ def newest(categoria): @support.scrape def peliculas(item): - # debug = True if item.contentType == 'movie': action = 'findvideos' elif item.contentType == 'tvshow': @@ -105,11 +104,10 @@ def peliculas(item): if item.args == 'newest': patron = r'
  • [^"]+)">
    \s*?]+>(?P[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?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)\])?\s?(?:[\(\[])?(?P<lang>[sS]ub-[iI][tT][aA])?(?:[\)\]])?\s?(?:\[(?P<quality>.+?)\])?\s?(?:\((?P<year>\d+)\))?<' patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?P<title2>\([\D*]+\))?(?:\[(?P<quality1>HD)\])?\s?(?:[\(\[])?(?P<lang>[sS]ub-[iI][tT][aA])?(?:[\)\]])?\s?(?:\[(?P<quality>.+?)\])?\s?(?:\((?P<year>\d+)\))?(?:\(\D{2}\s\d{4}\))?<' patronNext = r'<a href="([^"]+)"\s*>Pagina' - # debug = True + def itemHook(item): if item.quality1: @@ -120,8 +118,7 @@ def peliculas(item): item.title += support.typo(item.lang2, '_ [] color kod') if item.args == 'novita': item.title = item.title - # if 'wp-content' in item.thumbnail and not item.infoLabels['year']: - # item.infoLabels['year'] = item.thumbnail.split('/')[5] + return item return locals() @@ -133,11 +130,8 @@ def episodios(item): action = 'findvideos' item.contentType = 'tvshow' blacklist = [''] - # debug = True patron = r'"season-no">(?P<season>\d+)x(?P<episode>\d+)(?:[^>]+>){5}\s*(?P<title>[^<]+)(?P<data>.*?)</table>' - # patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)' patronBlock = r'<span>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?.*?</span>.*?class="content(?P<block>.*?)(?:"accordion-item|<script>)' - # patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)' return locals() @@ -145,10 +139,7 @@ def findvideos(item): if item.contentType != 'movie': links = support.match(item.data, patron=r'href="([^"]+)"').matches else: - matchData = item.data if item.data else item - links = support.match(matchData, patron=r'(?:SRC|href)="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="ads">').matches - data = '' - for link in links: - support.info('URL=',link) - data += link + '\n' - return support.server(item, data) + matchData = item.data if item.data else support.match(item.url, headers=headers).data + links = support.match(matchData, patron=r'data-id="([^"]+)"').matches + + return support.server(item, links) diff --git a/lib/unshortenit.py b/lib/unshortenit.py index 13f823ba..3c5d5c73 100644 --- a/lib/unshortenit.py +++ b/lib/unshortenit.py @@ -45,9 +45,9 @@ class UnshortenIt(object): _protectlink_regex = r'(?:s\.)?protectlink\.stream' _uprot_regex = r'uprot\.net' # for services that only include real link inside iframe - _simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link' + _simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link|icu' # for services that only do redirects - _simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream|isecure\.link' + _simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream|isecure\.link|icu' _filecrypt_regex = r'filecrypt\.cc' listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,