fix varios

allcalidad: fix findvideos
asialiveaction: fix enlaces + autoplay
cuelgame: desactivado, web con muchas cosas que no son solo videos
jkanime: fix cambios en la web
pedropolis: cambio de dominio + autoplay
vidup: fix
This commit is contained in:
Intel1
2018-08-25 12:25:27 -05:00
parent aaf6855de0
commit 0dd8d14c05
7 changed files with 195 additions and 364 deletions
+12 -12
View File
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
import urllib
from core import httptools
from core import scrapertools
from platformcode import logger
@@ -15,17 +17,15 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
data = httptools.downloadpage(page_url).data
key = scrapertools.find_single_match(data, "var thief\s*=\s*'([^']+)'")
data_vt = httptools.downloadpage("http://vidup.tv/jwv/%s" % key).data
vt = scrapertools.find_single_match(data_vt, 'file\|direct\|(.*?)\|')
# Extrae la URL
video_urls = []
media_urls = scrapertools.find_multiple_matches(data, '\{"file"\:"([^"]+)","label"\:"([^"]+)"\}')
for media_url, label in media_urls:
ext = scrapertools.get_filename_from_url(media_url)[-4:]
media_url += "?direct=false&ua=1&vt=%s" % vt
video_urls.append(["%s (%s) [vidup]" % (ext, label), media_url])
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
post= {}
post = urllib.urlencode(post)
url = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True).headers.get("location", "")
data = httptools.downloadpage("https://vidup.io/api/serve/video/" + scrapertools.find_single_match(url, "embed/([A-z0-9]+)"), post=post).data
bloque = scrapertools.find_single_match(data, 'qualities":\{(.*?)\}')
matches = scrapertools.find_multiple_matches(bloque, '"([^"]+)":"([^"]+)')
for res, media_url in matches:
video_urls.append(
[scrapertools.get_filename_from_url(media_url)[-4:] + " (" + res + ") [vidup.tv]", media_url])
video_urls.reverse()
return video_urls