Merge pull request #99 from Intel11/ultimo

Actualizados
This commit is contained in:
Alfa
2017-09-24 21:15:51 +02:00
committed by GitHub
3 changed files with 18 additions and 15 deletions

View File

@@ -15,7 +15,7 @@
"patterns": [
{
"pattern": "cloudy.ec/(?:embed.php\\?id=|v/)([A-z0-9]+)",
"url": "https://www.cloudy.ec/embed.php?id=\\1"
"url": "https://www.cloudy.ec/embed.php?id=\\1&playerPage=1"
}
]
},
@@ -49,4 +49,4 @@
}
],
"version": 1
}
}

View File

@@ -52,7 +52,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
numeros = scrapertools.find_single_match(data, '_[A-f0-9]+x[A-f0-9]+\s*(?:=|\^)\s*([0-9]{4,}|0x[A-f0-9]{4,})')
op1, op2 = scrapertools.find_single_match(data, '\(0x(\d),0x(\d)\);')
idparse, hexparse = scrapertools.find_multiple_matches(data, "parseInt\('([0-9]+)'")
numeros = [numeros, str(int(hexparse, 8))]
# numeros = [numeros, str(int(hexparse, 8))]
rangos, rangos2 = scrapertools.find_single_match(data, "\)-([0-9]+).0x4\)/\(([0-9]+)")
videourl = ""
for encode in var_encodes:
text_decode = ""
@@ -81,11 +82,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if value3 < index1:
break
value4 = value2 ^ decode1[j % (mult / 8)] ^ int(idparse,8)
for n in numeros:
if not n.isdigit():
n = int(n, 16)
value4 ^= int(n)
# value4 = value2 ^ decode1[j % (mult / 8)] ^ int(idparse,8)
# for n in numeros:
# if not n.isdigit():
# n = int(n, 16)
# value4 ^= int(n)
value4 = value2 ^ decode1[(j % 9)] ^ (int(idparse, 8) - int(rangos) + 4) / (int(rangos2) - 8) ^ int(hexparse, 8)
value5 = index1 * 2 + 127
for h in range(4):
valorfinal = (value4 >> 8 * h) & (value5)

View File

@@ -2,6 +2,7 @@
import urllib
from core import httptools
from core import scrapertools
from platformcode import logger
@@ -9,11 +10,11 @@ from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = scrapertools.cache_page(page_url)
data = httptools.downloadpage(page_url).data
if "Streaming link:" in data:
return True, ""
elif "Unfortunately, the file you want is not available." in data:
elif "Unfortunately, the file you want is not available." in data or "Unfortunately, the video you want to see is not available" in data:
return False, "[Uptobox] El archivo no existe o ha sido borrado"
wait = scrapertools.find_single_match(data, "You have to wait ([0-9]+) (minute|second)")
if len(wait) > 0:
@@ -27,20 +28,20 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.info("(page_url='%s')" % page_url)
# Si el enlace es directo de upstream
if "uptobox" not in page_url:
data = scrapertools.cache_page(page_url)
data = httptools.downloadpage(page_url).data
if "Video not found" in data:
page_url = page_url.replace("uptostream.com/iframe/", "uptobox.com/")
data = scrapertools.cache_page(page_url)
data = httptools.downloadpage(page_url).data
video_urls = uptobox(page_url, data)
else:
video_urls = uptostream(data)
else:
data = scrapertools.cache_page(page_url)
data = httptools.downloadpage(page_url).data
# Si el archivo tiene enlace de streaming se redirige a upstream
if "Streaming link:" in data:
page_url = "http://uptostream.com/iframe/" + scrapertools.find_single_match(page_url,
'uptobox.com/([a-z0-9]+)')
data = scrapertools.cache_page(page_url)
data = httptools.downloadpage(page_url).data
video_urls = uptostream(data)
else:
# Si no lo tiene se utiliza la descarga normal
@@ -76,7 +77,7 @@ def uptobox(url, data):
for inputname, inputvalue in matches:
post += inputname + "=" + inputvalue + "&"
data = scrapertools.cache_page(url, post=post[:-1])
data = httptools.downloadpage(url, post=post[:-1]).data
media = scrapertools.find_single_match(data, '<a href="([^"]+)">\s*<span class="button_upload green">')
# Solo es necesario codificar la ultima parte de la url
url_strip = urllib.quote(media.rsplit('/', 1)[1])