Merge branch 'master' into Fixes

This commit is contained in:
Alfa
2017-10-14 20:42:06 -04:00
committed by GitHub
19 changed files with 366 additions and 823 deletions
-49
View File
@@ -1,49 +0,0 @@
{
"active": true,
"changes": [
{
"date": "16/02/2017",
"description": "Primera versión"
}
],
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "((?:copiapop.com|diskokosmiko.mx)/[^\\s'\"]+)",
"url": "http://\\1"
}
]
},
"free": true,
"id": "copiapop",
"name": "copiapop",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "Incluir en lista negra",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "Incluir en lista de favoritos",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "http://i.imgur.com/EjbfM7p.png?1",
"version": 1
}
-53
View File
@@ -1,53 +0,0 @@
# -*- coding: utf-8 -*-
from core import httptools
from core import jsontools
from core import scrapertools
from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
if "copiapop.com" in page_url:
from channels import copiapop
logueado, error_message = copiapop.login("copiapop.com")
if not logueado:
return False, error_message
data = httptools.downloadpage(page_url).data
if ("File was deleted" or "Not Found" or "File was locked by administrator") in data:
return False, "[Copiapop] El archivo no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
host = "http://copiapop.com"
host_string = "copiapop"
if "diskokosmiko.mx" in page_url:
host = "http://diskokosmiko.mx"
host_string = "diskokosmiko"
url = scrapertools.find_single_match(data, '<form action="([^"]+)" class="download_form"')
if url:
url = host + url
fileid = url.rsplit("f=", 1)[1]
token = scrapertools.find_single_match(data,
'<div class="download_container">.*?name="__RequestVerificationToken".*?value="([^"]+)"')
post = "fileId=%s&__RequestVerificationToken=%s" % (fileid, token)
headers = {'X-Requested-With': 'XMLHttpRequest'}
data = httptools.downloadpage(url, post, headers).data
data = jsontools.load(data)
mediaurl = data.get("DownloadUrl")
extension = data.get("Extension")
video_urls.append([".%s [%s]" % (extension, host_string), mediaurl])
for video_url in video_urls:
logger.info(" %s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -45,7 +45,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
headers['Accept'] = "*/*"
headers['Host'] = "www.flashx.tv"
coding_url = 'https://www.flashx.tv/flashx.php?fxfx=7'
coding_url = 'https://www.flashx.tv/flashx.php?f=x&fxfx=6'
headers['X-Requested-With'] = 'XMLHttpRequest'
httptools.downloadpage(coding_url, headers=headers)
+1 -2
View File
@@ -24,7 +24,7 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url, add_referer = True).data
data = httptools.downloadpage(page_url, add_referer = True, headers=headers).data
packer = scrapertools.find_single_match(data,
"<script type='text/javascript'>(eval.function.p,a,c,k,e,d..*?)</script>")
@@ -32,7 +32,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = jsunpack.unpack(packer)
data = re.sub(r'\n|\t|\s+', '', data)
host = scrapertools.find_single_match(data, '\[\{image:"(http://[^/]+/)')
mediaurl = scrapertools.find_single_match(data, ',\{file:"([^"]+)"')
if not mediaurl.startswith(host):
+1 -2
View File
@@ -20,10 +20,9 @@ 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 mpri_Key\s*=\s*'([^']+)'")
data_vt = httptools.downloadpage("http://vidup.me/jwv/%s" % key).data
vt = scrapertools.find_single_match(data_vt, 'direct\|([^\|]+)\|')
vt = scrapertools.find_single_match(data_vt, 'file\|(.*?)\|direct')
# Extrae la URL
video_urls = []
+2 -1
View File
@@ -52,5 +52,6 @@
"visible": false
}
],
"thumbnail": "https://s1.postimg.org/597or3a31b/vidzi1.png",
"version": 1
}
}