fix tantiflm, url fembed, nuovo server hdplayer e tentativo iniziale fix mystream

This commit is contained in:
marco
2019-12-29 15:25:05 +01:00
parent 6ae24a4f78
commit 7cb35cb36c
6 changed files with 89 additions and 20 deletions
+4
View File
@@ -6,6 +6,10 @@
{
"pattern": "((?:fembed|divload|cercafilm|sonline).(?:com|net|pro)/(?:f|v)/[A-z0-9_-]+)",
"url": "https://www.\\1"
},
{
"pattern": "(verystream.info/v/[A-z0-9_-]+)",
"url": "https://www.\\1"
}
]
},
+42
View File
@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "https://hdplayer\\.casa//public/dist/index\\.html\\?id=([a-z0-9]+)",
"url": "https://hdplayer.casa/public/dist/index.html?id=\\1"
}
]
},
"free": true,
"id": "hdplayer",
"name": "HDPlayer",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "server_hdload"
}
+18
View File
@@ -0,0 +1,18 @@
from core import httptools
from core import scrapertools
from platformcode import config
def test_video_exists(page_url):
stream_url = get_stream_url(page_url)
data = httptools.downloadpage(stream_url).data
if "Error Playlist" in data:
return False, config.get_localized_string(70449) % "HDPlayer"
return True, ""
def get_stream_url(url):
id = scrapertools.find_single_match(url, 'id=([a-z0-9]+)')
return 'https://hdplayer.casa/hls/' + id + '/' + id + '.playlist.m3u8'
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
return [('.m3u8', get_stream_url(page_url))]
+8
View File
@@ -6,6 +6,14 @@
{
"pattern": "https://embed.mystream.to/(\\w+)",
"url": "https://embed.mystream.to/\\1"
},
{
"pattern": "https://mystream\\.premiumserver\\.club/(\\w+)",
"url": "https://embed.mystream.to/\\1"
},
{
"pattern": "https://mstream\\.(?:xyz|icu)/(\\w+)",
"url": "https://embed.mystream.to/\\1"
}
]
},
+6
View File
@@ -7,6 +7,7 @@ import re
from core import httptools
from core import scrapertools
from lib import js2py
from lib.aadecode import decode as aadecode
from platformcode import logger
@@ -27,6 +28,11 @@ def get_video_url(page_url, premium = False, user = "", password = "", video_pas
headers = {'referer': page_url}
data = httptools.downloadpage(page_url, headers=headers).data
data = re.sub(r'"|\n|\r|\t|&nbsp;|<br>|\s{2,}', "", data)
for c in scrapertools.find_multiple_matches(data, '<script>(.*?)</script>'):
if 'function vv' in c:
vv = js2py.eval_js(c)
if 'key' in c:
key = js2py.eval_js(c)
code = scrapertools.find_single_match(data, '(?s)<script>\s*゚ω゚(.*?)</script>').strip()
text_decode = aadecode(code)
matches = scrapertools.find_multiple_matches(text_decode, "'src', '([^']+)'")