nuevo conector cloudsany
This commit is contained in:
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"date": "09/10/2017",
|
||||||
|
"description": "Versión inicial"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "cloudsany.com/i/([A-z0-9]+)",
|
||||||
|
"url": "https://cloudsany.com/i/\\1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "cloudsany",
|
||||||
|
"name": "cloudsany",
|
||||||
|
"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": "https://s1.postimg.org/6wixo35myn/cloudsany1.png",
|
||||||
|
"version": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Alfa addon - KODI Plugin
|
||||||
|
# Conector para cloudsany
|
||||||
|
# https://github.com/alfa-addon
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from lib import jsunpack
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
if "no longer exists" in data:
|
||||||
|
return False, "[Cloudsany] El fichero ha sido borrado"
|
||||||
|
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, user="", password="", video_password=""):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
data = scrapertools.find_single_match(data, 'p,a,c,k,e.*?</script>')
|
||||||
|
unpack = jsunpack.unpack(data)
|
||||||
|
logger.info("Intel11 %s" %unpack)
|
||||||
|
video_urls = []
|
||||||
|
videourl = scrapertools.find_single_match(unpack, 'config={file:"([^"]+)')
|
||||||
|
video_urls.append([".MP4 [Cloudsany]", videourl])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
Reference in New Issue
Block a user