From ae93e4d1f60891cef37310d52c0738b014751b4e Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Wed, 27 Oct 2021 19:34:39 +0200 Subject: [PATCH] Fix tantiflm, animealtadefinizione utiltimi ep e nascosti ep non ancora caricati --- channels/animealtadefinizione.py | 9 +++++++-- channels/tantifilm.py | 4 ---- lib/unshortenit.py | 10 +++++++++- servers/doodstream.json | 2 +- servers/evoload.json | 2 +- servers/maxstream.json | 4 ++++ 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/channels/animealtadefinizione.py b/channels/animealtadefinizione.py index e9727a29..4171d397 100644 --- a/channels/animealtadefinizione.py +++ b/channels/animealtadefinizione.py @@ -10,7 +10,7 @@ headers = [['Referer', host]] perpage_list = ['20','30','40','50','60','70','80','90','100'] perpage = perpage_list[support.config.get_setting('perpage' , 'animealtadefinizione')] -epPatron = r'\s*(?P[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"' +epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img[^>]+/Streaming' @support.menu @@ -67,7 +67,7 @@ def peliculas(item): action='findvideos' elif item.args == 'last': item.contentType = 'episode' - action='findvideos' + action='episodios' else: item.contentType = 'tvshow' action='episodios' @@ -85,6 +85,10 @@ def peliculas(item): typeContentDict = {'movie':['movie']} typeActionDict = {'findvideos':['movie']} + def itemHook(item): + item.url = support.re.sub('episodio-[0-9-]+', '', item.url) + return item + def itemlistHook(itemlist): if item.search: itemlist = [ it for it in itemlist if ' Episodio ' not in it.title ] @@ -98,6 +102,7 @@ def peliculas(item): @support.scrape def episodios(item): anime = True + # debug = True pagination = int(perpage) patron = epPatron return locals() diff --git a/channels/tantifilm.py b/channels/tantifilm.py index b04ac070..db54dd39 100644 --- a/channels/tantifilm.py +++ b/channels/tantifilm.py @@ -209,10 +209,6 @@ def findvideos(item): urls.remove(u) itemlist.extend(support.server(item, itemlist=hdpass(Item(url=u)))) break - if 'protectlink.stream' in u: - import base64 - urls.remove(u) - urls.append(base64.b64decode(u.split('?data=')[1])) else: itemlist.extend(support.server(item, urls)) support.addQualityTag(item, itemlist, data, 'Keywords:\s*(?:<span>)?([^<]+)') diff --git a/lib/unshortenit.py b/lib/unshortenit.py index 9eb924e0..74ccbf01 100644 --- a/lib/unshortenit.py +++ b/lib/unshortenit.py @@ -43,6 +43,7 @@ class UnshortenIt(object): _stayonline_regex = r'stayonline\.pro' _snip_regex = r'[0-9a-z]+snip\.|uprotector\.xyz' _linksafe_regex = r'linksafe\.cc' + _protectlink_regex = r'(?:s\.)?protectlink\.stream' # for services that only include real link inside iframe _simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link' # for services that only do redirects @@ -50,7 +51,7 @@ class UnshortenIt(object): listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex, _shrink_service_regex, _rapidcrypt_regex, _simple_iframe_regex, _linkup_regex, _linkhub_regex, - _swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _simple_redirect] + _swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _simple_redirect] _maxretries = 5 @@ -101,6 +102,8 @@ class UnshortenIt(object): uri, code = self._unshorten_snip(uri) if re.search(self._linksafe_regex, uri, re.IGNORECASE): uri, code = self._unshorten_linksafe(uri) + if re.search(self._protectlink_regex, uri, re.IGNORECASE): + uri, code = self._unshorten_protectlink(uri) if re.search(self._simple_redirect, uri, re.IGNORECASE): p = httptools.downloadpage(uri) uri = p.url @@ -674,6 +677,11 @@ class UnshortenIt(object): def _unshorten_linksafe(self, uri): return b64decode(uri.split('?url=')[-1]).decode(), 200 + def _unshorten_protectlink(self, uri): + if '?data=' in uri: + return b64decode(uri.split('?data=')[-1]).decode(), 200 + else: + return httptools.downloadpage(uri, only_headers=True, follow_redirects=False).headers.get('location', uri), 200 def decrypt_aes(text, key): try: diff --git a/servers/doodstream.json b/servers/doodstream.json index c9cf0239..ff7cb51b 100644 --- a/servers/doodstream.json +++ b/servers/doodstream.json @@ -4,7 +4,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "dood(?:stream)?.[^/]+/(?:e|d)/([a-z0-9]+)", + "pattern": "dood(?:stream)?.[^/]+/+(?:e|d)/([a-z0-9]+)", "url": "https://dood.to/e/\\1" } ] diff --git a/servers/evoload.json b/servers/evoload.json index e9941cbd..17d7034b 100644 --- a/servers/evoload.json +++ b/servers/evoload.json @@ -4,7 +4,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "https?://evoload.io/v/([a-zA-Z0-9]+)", + "pattern": "https?://evoload.io/[ve]/([a-zA-Z0-9]+)", "url": "https://evoload.io/e/\\1?h=https://evoload.io/v/\\1" } ] diff --git a/servers/maxstream.json b/servers/maxstream.json index 09311d52..3f56caf0 100644 --- a/servers/maxstream.json +++ b/servers/maxstream.json @@ -3,6 +3,10 @@ "find_videos": { "ignore_urls": [], "patterns": [ + { + "pattern": "(https?://maxstream.video/uprote/[a-zA-Z0-9]+)", + "url": "\\1" + }, { "pattern": "https?://maxstream.video/(?:e/|embed-|cast/)?([a-z0-9]+)", "url": "http://maxstream.video/\\1"