nuovo server upstream

This commit is contained in:
Alhaziel
2020-02-01 18:09:01 +01:00
parent 09b4f53846
commit 4d679b88e9
3 changed files with 69 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector UP Stream By Alfa development Group
# --------------------------------------------------------
from core import httptools
from core import scrapertools
from lib import jsunpack
from platformcode import logger, config
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
global data
data = httptools.downloadpage(page_url).data
if "<h2>WE ARE SORRY</h2>" in data or '<title>404 Not Found</title>' in data:
return False, config.get_localized_string(70449) % "UP Stream"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
video_urls = []
media_url = scrapertools.find_single_match(data, r'file:"([^"]+)"')
video_urls.append(["%s [UP Stream]" % media_url.split('.'[-1]), media_url])
return video_urls