rebase servers
This commit is contained in:
+1
-8
@@ -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| |<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', '([^']+)'")
|
||||
|
||||
Reference in New Issue
Block a user