Correcciones y novedades

This commit is contained in:
Alfa-beto
2019-03-27 15:29:23 -03:00
committed by GitHub
parent 0e20aaf456
commit 3fad1e3566
3 changed files with 70 additions and 1 deletions

View File

@@ -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 = '<meta property="og:video" content="([^"]+)">'
matches = scrapertools.find_multiple_matches(data, patron)
for url in matches:

View File

@@ -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"
}

View File

@@ -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|&nbsp;|<br>|\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