rebase servers

This commit is contained in:
marco
2020-03-06 20:50:52 +01:00
parent a2c4aeb93b
commit 2ecdf23042
193 changed files with 5798 additions and 509 deletions
+1 -8
View File
@@ -4,10 +4,8 @@
# --------------------------------------------------------
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
@@ -17,7 +15,7 @@ def test_video_exists(page_url):
data = httptools.downloadpage(page_url)
if data.code == 404:
return False, "[mystream] El archivo no existe o ha sido borrado"
if "<title>video is no longer available" in data.data:
if "<title>video is no longer available" in data.data or "<title>Video not found" in data.data:
return False, "[mystream] El archivo no existe o ha sido borrado"
return True, ""
@@ -28,11 +26,6 @@ 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', '([^']+)'")