From 3fad1e3566eb92450e56e1527d12becd160bc56e Mon Sep 17 00:00:00 2001
From: Alfa-beto <30815244+Alfa-beto@users.noreply.github.com>
Date: Wed, 27 Mar 2019 15:29:23 -0300
Subject: [PATCH] Correcciones y novedades
---
plugin.video.alfa/servers/archiveorg.py | 1 -
plugin.video.alfa/servers/cinemaupload.json | 42 +++++++++++++++++++++
plugin.video.alfa/servers/cinemaupload.py | 28 ++++++++++++++
3 files changed, 70 insertions(+), 1 deletion(-)
create mode 100644 plugin.video.alfa/servers/cinemaupload.json
create mode 100644 plugin.video.alfa/servers/cinemaupload.py
diff --git a/plugin.video.alfa/servers/archiveorg.py b/plugin.video.alfa/servers/archiveorg.py
index a954cc35..2d93aa79 100644
--- a/plugin.video.alfa/servers/archiveorg.py
+++ b/plugin.video.alfa/servers/archiveorg.py
@@ -20,7 +20,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.info("url=" + page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
- logger.debug(data)
patron = ''
matches = scrapertools.find_multiple_matches(data, patron)
for url in matches:
diff --git a/plugin.video.alfa/servers/cinemaupload.json b/plugin.video.alfa/servers/cinemaupload.json
new file mode 100644
index 00000000..99bc9e2b
--- /dev/null
+++ b/plugin.video.alfa/servers/cinemaupload.json
@@ -0,0 +1,42 @@
+{
+ "active": true,
+ "find_videos": {
+ "ignore_urls": [],
+ "patterns": [
+ {
+ "pattern": "https://cinemaupload.com/embed/([a-zA-Z0-9]+)",
+ "url": "https://cinemaupload.com/embed/\\1/"
+ }
+ ]
+ },
+ "free": true,
+ "id": "cinemaupload",
+ "name": "cinemaupload",
+ "settings": [
+ {
+ "default": false,
+ "enabled": true,
+ "id": "black_list",
+ "label": "@60654",
+ "type": "bool",
+ "visible": true
+ },
+ {
+ "default": 0,
+ "enabled": true,
+ "id": "favorites_servers_list",
+ "label": "@60655",
+ "lvalues": [
+ "No",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ "type": "list",
+ "visible": false
+ }
+ ],
+ "thumbnail": "https://cinemaupload.com/static/img/logo1.png"
+}
diff --git a/plugin.video.alfa/servers/cinemaupload.py b/plugin.video.alfa/servers/cinemaupload.py
new file mode 100644
index 00000000..69191999
--- /dev/null
+++ b/plugin.video.alfa/servers/cinemaupload.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# --------------------------------------------------------
+# Conector Cinemaupload By Alfa development Group
+# --------------------------------------------------------
+import re
+from core import httptools
+from core import scrapertools
+from platformcode import logger
+
+
+def test_video_exists(page_url):
+ logger.info("(page_url='%s')" % page_url)
+ data = httptools.downloadpage(page_url)
+ if data.code == 404:
+ return False, "[CinemaUpload] El archivo no existe o ha sido borrado"
+ return True, ""
+
+
+def get_video_url(page_url, premium=False, user="", password="", video_password=""):
+ logger.info("url=" + page_url)
+ video_urls = []
+ data = httptools.downloadpage(page_url).data
+ data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data)
+ patron = "source: '([^']+)',"
+ matches = scrapertools.find_multiple_matches(data, patron)
+ for url in matches:
+ video_urls.append(['.m3u8 [CinemaUpload]', url])
+ return video_urls