From b33a250f9e4e19afe7d255f37d3b2a1ca76d401c Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 23 Oct 2021 09:47:52 +0200 Subject: [PATCH] Fix Stayonline --- lib/unshortenit.py | 2 ++ servers/maxstream.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/unshortenit.py b/lib/unshortenit.py index 7ff3f624..9eb924e0 100644 --- a/lib/unshortenit.py +++ b/lib/unshortenit.py @@ -630,6 +630,7 @@ class UnshortenIt(object): return uri, str(e) def _unshorten_stayonline(self, uri): + # from core.support import dbg;dbg() try: id = uri.split('/')[-2] reqUrl = 'https://stayonline.pro/ajax/linkView.php' @@ -641,6 +642,7 @@ class UnshortenIt(object): uri = json.loads(data)['data']['value'] except: uri = scrapertools.find_single_match(data, r'"value"\s*:\s*"([^"]+)"') + uri = httptools.downloadpage(uri, only_headers=True).url return uri, r.code except Exception as e: return uri, str(e) diff --git a/servers/maxstream.py b/servers/maxstream.py index 99e60340..dc831e99 100644 --- a/servers/maxstream.py +++ b/servers/maxstream.py @@ -21,7 +21,7 @@ def test_video_exists(page_url): global data data = httptools.downloadpage(page_url).data - if "file was deleted" in data: + if scrapertools.find_single_match(data, '(?]*>file was deleted'): return False, config.get_localized_string(70449) % "MaxStream" return True, "" @@ -51,8 +51,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= # return [] packed = support.match(data, patron=r"(eval\(function\(p,a,c,k,e,d\).*?)\s*