Fix Stayonline

This commit is contained in:
Alhaziel01
2021-10-23 09:47:52 +02:00
parent d09be99136
commit b33a250f9e
2 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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, '(?<!none);[^>]*>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*</script").match
unpack = jsunpack.unpack(packed)
url = scrapertools.find_single_match(unpack, 'src:\s*"([^"]+)')
if packed:
data = jsunpack.unpack(packed)
url = scrapertools.find_single_match(data, 'src:\s*"([^"]+)')
if url:
video_urls.append(['m3u8 [MaxStream]', url])
return video_urls