Update cinecalidad.py
This commit is contained in:
@@ -28,19 +28,21 @@ list_servers = [
|
|||||||
'pcloud',
|
'pcloud',
|
||||||
'usersfiles',
|
'usersfiles',
|
||||||
'vidbull',
|
'vidbull',
|
||||||
|
'openload',
|
||||||
'rapidvideo',
|
'rapidvideo',
|
||||||
'streamango',
|
'streamango',
|
||||||
'openload',
|
'directo',
|
||||||
'directo'
|
'torrent'
|
||||||
]
|
]
|
||||||
|
|
||||||
host = 'http://www.cinecalidad.to'
|
host = 'http://www.cinecalidad.to'
|
||||||
thumbmx = 'http://flags.fmcdn.net/data/flags/normal/mx.png'
|
thumbmx = 'http://flags.fmcdn.net/data/flags/normal/mx.png'
|
||||||
thumbes = 'http://flags.fmcdn.net/data/flags/normal/es.png'
|
thumbes = 'http://flags.fmcdn.net/data/flags/normal/es.png'
|
||||||
thumbbr = 'http://flags.fmcdn.net/data/flags/normal/br.png'
|
thumbbr = 'http://flags.fmcdn.net/data/flags/normal/br.png'
|
||||||
|
current_lang = ''
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
global host
|
||||||
idioma2 = "destacadas"
|
idioma2 = "destacadas"
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
@@ -50,14 +52,14 @@ def mainlist(item):
|
|||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title="CineCalidad Latino",
|
item.clone(title="CineCalidad Latino",
|
||||||
action="submenu",
|
action="submenu",
|
||||||
host="http://cinecalidad.com/",
|
host="http://cinecalidad.to/",
|
||||||
thumbnail=thumbmx,
|
thumbnail=thumbmx,
|
||||||
extra="peliculas",
|
extra="peliculas",
|
||||||
))
|
))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="CineCalidad Castellano",
|
itemlist.append(item.clone(title="CineCalidad Castellano",
|
||||||
action="submenu",
|
action="submenu",
|
||||||
host="http://cinecalidad.com/espana/",
|
host="http://cinecalidad.to/espana/",
|
||||||
thumbnail=thumbes,
|
thumbnail=thumbes,
|
||||||
extra="peliculas",
|
extra="peliculas",
|
||||||
))
|
))
|
||||||
@@ -65,7 +67,7 @@ def mainlist(item):
|
|||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title="CineCalidad Portugues",
|
item.clone(title="CineCalidad Portugues",
|
||||||
action="submenu",
|
action="submenu",
|
||||||
host="http://cinemaqualidade.com/",
|
host="http://cinemaqualidade.to/",
|
||||||
thumbnail=thumbbr,
|
thumbnail=thumbbr,
|
||||||
extra="filmes",
|
extra="filmes",
|
||||||
))
|
))
|
||||||
@@ -79,7 +81,7 @@ def submenu(item):
|
|||||||
idioma = 'peliculas'
|
idioma = 'peliculas'
|
||||||
idioma2 = "destacada"
|
idioma2 = "destacada"
|
||||||
host = item.host
|
host = item.host
|
||||||
if item.host == "http://cinemaqualidade.com/":
|
if item.host == "http://cinemaqualidade.to/":
|
||||||
idioma = "filmes"
|
idioma = "filmes"
|
||||||
idioma2 = "destacado"
|
idioma2 = "destacado"
|
||||||
logger.info()
|
logger.info()
|
||||||
@@ -108,7 +110,7 @@ def submenu(item):
|
|||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel=item.channel,
|
||||||
title="Por Año",
|
title="Por Año",
|
||||||
action="anyos",
|
action="anyos",
|
||||||
url=host + "/" + idioma + "-por-ano",
|
url=host + idioma + "-por-ano",
|
||||||
thumbnail=get_thumb('year', auto=True),
|
thumbnail=get_thumb('year', auto=True),
|
||||||
fanart='https://s8.postimg.org/7eoedwfg5/pora_o.png',
|
fanart='https://s8.postimg.org/7eoedwfg5/pora_o.png',
|
||||||
))
|
))
|
||||||
@@ -128,7 +130,7 @@ def anyos(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = '<a href="([^"]+)">([^<]+)</a> '
|
patron = '<a href="([^"]+)">([^<]+)</a><br'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
@@ -175,7 +177,7 @@ def generos(item):
|
|||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
title = scrapedtitle
|
title = scrapedtitle
|
||||||
thumbnail = tgenero[scrapedtitle]
|
thumbnail = ''
|
||||||
plot = item.plot
|
plot = item.plot
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
@@ -192,13 +194,17 @@ def generos(item):
|
|||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
global current_lang
|
||||||
itemlist = []
|
itemlist = []
|
||||||
if 'espana' in host:
|
|
||||||
item.language = 'castellano'
|
if 'cinemaqualidade' in item.url:
|
||||||
elif 'cinecalidad' in host:
|
current_lang = 'portugues'
|
||||||
item.language = 'latino'
|
elif 'espana' in item.url:
|
||||||
else:
|
current_lang = 'castellano'
|
||||||
item.language = 'portugues'
|
elif 'cinecalidad' in item.url:
|
||||||
|
current_lang = 'latino'
|
||||||
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = '<div class="home_post_cont.*? post_box">.*?<a href="(.*?)".*?'
|
patron = '<div class="home_post_cont.*? post_box">.*?<a href="(.*?)".*?'
|
||||||
patron += 'src="(.*?)".*?title="(.*?) \((.*?)\).*?".*?p>(.*?)<'
|
patron += 'src="(.*?)".*?title="(.*?) \((.*?)\).*?".*?p>(.*?)<'
|
||||||
@@ -221,7 +227,7 @@ def peliculas(item):
|
|||||||
fanart='https://s31.postimg.org/puxmvsi7v/cinecalidad.png',
|
fanart='https://s31.postimg.org/puxmvsi7v/cinecalidad.png',
|
||||||
contentTitle=contentTitle,
|
contentTitle=contentTitle,
|
||||||
infoLabels={'year': year},
|
infoLabels={'year': year},
|
||||||
language=item.language,
|
language=current_lang,
|
||||||
context=autoplay.context
|
context=autoplay.context
|
||||||
))
|
))
|
||||||
|
|
||||||
@@ -247,7 +253,7 @@ def dec(item):
|
|||||||
val = item.split(' ')
|
val = item.split(' ')
|
||||||
link = map(int, val)
|
link = map(int, val)
|
||||||
for i in range(len(link)):
|
for i in range(len(link)):
|
||||||
link[i] = link[i] - 7
|
link[i] = link[i] - 6
|
||||||
real = ''.join(map(chr, link))
|
real = ''.join(map(chr, link))
|
||||||
return (real)
|
return (real)
|
||||||
|
|
||||||
@@ -275,10 +281,11 @@ def findvideos(item):
|
|||||||
"https://www.yourupload.com/watch/": "yourupload",
|
"https://www.yourupload.com/watch/": "yourupload",
|
||||||
"http://www.cinecalidad.to/protect/gdredirect.php?l=": "directo",
|
"http://www.cinecalidad.to/protect/gdredirect.php?l=": "directo",
|
||||||
"https://openload.co/embed/": "openload",
|
"https://openload.co/embed/": "openload",
|
||||||
"https://streamango.com/embed/": "streamango",
|
"https://streamango.com/embed/f/": "streamango",
|
||||||
"https://www.rapidvideo.com/embed/": "rapidvideo",
|
"https://www.rapidvideo.com/embed/": "rapidvideo",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
duplicados = []
|
duplicados = []
|
||||||
@@ -288,40 +295,53 @@ def findvideos(item):
|
|||||||
|
|
||||||
server_url = {'YourUpload': 'https://www.yourupload.com/embed/',
|
server_url = {'YourUpload': 'https://www.yourupload.com/embed/',
|
||||||
'Openload': 'https://openload.co/embed/',
|
'Openload': 'https://openload.co/embed/',
|
||||||
|
'TVM': 'https://thevideo.me/embed-',
|
||||||
'Streamango': 'https://streamango.com/embed/',
|
'Streamango': 'https://streamango.com/embed/',
|
||||||
'RapidVideo': 'https://www.rapidvideo.com/embed/',
|
'RapidVideo': 'https://www.rapidvideo.com/embed/',
|
||||||
'TVM': 'https://thevideo.me/embed-',
|
|
||||||
'Trailer': '',
|
'Trailer': '',
|
||||||
'BitTorrent': '',
|
'BitTorrent': '',
|
||||||
'Mega': '',
|
'Mega': '',
|
||||||
'MediaFire': ''}
|
'MediaFire': ''}
|
||||||
|
|
||||||
for video_cod, server_id in matches:
|
for video_cod, server_id in matches:
|
||||||
if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer', '']:
|
if server_id not in ['Mega', 'MediaFire', 'Trailer', '']:
|
||||||
video_id = dec(video_cod)
|
video_id = dec(video_cod)
|
||||||
|
|
||||||
|
logger.debug('server_id %s' % server_id)
|
||||||
if server_id in server_url:
|
if server_id in server_url:
|
||||||
server = server_id.lower()
|
server = server_id.lower()
|
||||||
thumbnail = item.thumbnail
|
thumbnail = item.thumbnail
|
||||||
if server_id == 'TVM':
|
if server_id == 'TVM':
|
||||||
server = 'thevideome'
|
server = 'thevideome'
|
||||||
url = server_url[server_id] + video_id + '.html'
|
url = server_url[server_id] + video_id + '.html'
|
||||||
|
elif server_id == 'BitTorrent':
|
||||||
|
base_url = 'http://www.cinecalidad.to/protect/contenido.php'
|
||||||
|
post = 'i=%s&title=%s' % (video_id, item.contentTitle)
|
||||||
|
protect = httptools.downloadpage(base_url, post=post).data
|
||||||
|
url = scrapertools.find_single_match(protect, 'value="(magnet.*?)"')
|
||||||
|
server = 'torrent'
|
||||||
else:
|
else:
|
||||||
url = server_url[server_id] + video_id
|
url = server_url[server_id] + video_id
|
||||||
title = item.contentTitle + ' (%s)' % server
|
title = item.contentTitle + ' (%s)' % server
|
||||||
quality = 'default'
|
quality = 'default'
|
||||||
|
|
||||||
if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer']:
|
if server_id not in ['Mega', 'MediaFire', 'Trailer']:
|
||||||
|
if server != 'torrent':
|
||||||
|
language = IDIOMAS[item.language]
|
||||||
|
else:
|
||||||
|
language = [IDIOMAS[item.language], 'vose']
|
||||||
if url not in duplicados:
|
if url not in duplicados:
|
||||||
itemlist.append(item.clone(action='play',
|
new_item = Item(channel=item.channel,
|
||||||
title=title,
|
action='play',
|
||||||
fulltitle=item.contentTitle,
|
title=title,
|
||||||
url=url,
|
fulltitle=item.contentTitle,
|
||||||
language=IDIOMAS[item.language],
|
url=url,
|
||||||
thumbnail=thumbnail,
|
language= language,
|
||||||
quality=quality,
|
thumbnail=thumbnail,
|
||||||
server=server
|
quality=quality,
|
||||||
))
|
server=server
|
||||||
|
)
|
||||||
|
itemlist.append(new_item)
|
||||||
duplicados.append(url)
|
duplicados.append(url)
|
||||||
|
|
||||||
# Requerido para FilterTools
|
# Requerido para FilterTools
|
||||||
|
|||||||
Reference in New Issue
Block a user