Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -4,11 +4,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "https://embed.mystream.to/(\\w+)",
|
"pattern": "(?:\\w+\\.)?my?stream\\.(?:to|fun)/(?:watch/)?([a-zA-Z0-9]+)",
|
||||||
"url": "https://embed.mystream.to/\\1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pattern": "https://mystream.to/watch/(\\w+)",
|
|
||||||
"url": "https://embed.mystream.to/\\1"
|
"url": "https://embed.mystream.to/\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+19
-19
@@ -2,33 +2,33 @@
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Conector mystream By Alfa development Group
|
# Conector mystream By Alfa development Group
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
import re
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from lib.aadecode import decode as aadecode
|
from lib import js2py
|
||||||
from platformcode import logger
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
data = httptools.downloadpage(page_url)
|
data = httptools.downloadpage(page_url)
|
||||||
|
global page_data
|
||||||
|
page_data = data.data
|
||||||
if data.code == 404:
|
if data.code == 404:
|
||||||
return False, "[mystream] El archivo no existe o ha sido borrado"
|
return False, config.get_localized_string(70449) % "mystream"
|
||||||
if "<title>video is no longer available" in data.data or "<title>Video not found" in data.data:
|
if "<title>video is no longer available" in data.data or "<title>Video not found" in data.data or "We are unable to find the video" in data.data:
|
||||||
return False, "[mystream] El archivo no existe o ha sido borrado"
|
return False, config.get_localized_string(70449) % "mystream"
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
def get_video_url(page_url, premium = False, user = "", password = "", video_password = ""):
|
logger.info("(page_url='%s')" % page_url)
|
||||||
logger.info("url=" + page_url)
|
|
||||||
video_urls = []
|
video_urls = []
|
||||||
headers = {'referer': page_url}
|
global page_data
|
||||||
data = httptools.downloadpage(page_url, headers=headers).data
|
dec = scrapertools.find_single_match(page_data, '(\$=~\[\];.*?\(\)\))\(\);')
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
# needed to increase recursion
|
||||||
code = scrapertools.find_single_match(data, '(?s)<script>\s*゚ω゚(.*?)</script>').strip()
|
import sys
|
||||||
text_decode = aadecode(code)
|
sys.setrecursionlimit(10000)
|
||||||
matches = scrapertools.find_multiple_matches(text_decode, "'src', '([^']+)'")
|
|
||||||
for url in matches:
|
deObfCode = js2py.eval_js(dec)
|
||||||
video_urls.append(['mystream [mp4]',url])
|
|
||||||
return video_urls
|
video_urls.append(['mp4 [mystream]', scrapertools.find_single_match(str(deObfCode), "'src',\s*'([^']+)")])
|
||||||
|
return video_urls
|
||||||
Reference in New Issue
Block a user