Merge remote-tracking branch 'alfa-addon/master'

This commit is contained in:
unknown
2017-08-26 15:33:54 -03:00
20 changed files with 817 additions and 1604 deletions
@@ -285,6 +285,7 @@ function get_response(data) {
else { else {
keypress = ""; keypress = "";
}; };
if (!data.items[x].value) data.items[x].value = "";
itemlist[data.items[x].category].push(replace_list(html.config.text, { itemlist[data.items[x].category].push(replace_list(html.config.text, {
"item_color": data.items[x].color, "item_color": data.items[x].color,
"item_label": data.items[x].label, "item_label": data.items[x].label,
+9 -7
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.alfa" name="Alfa" version="1.9.0" provider-name="Alfa Addon"> <addon id="plugin.video.alfa" name="Alfa" version="1.9.1" provider-name="Alfa Addon">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent" optional="true"/> <import addon="script.module.libtorrent" optional="true"/>
@@ -19,13 +19,15 @@
</assets> </assets>
<news>[B]Estos son los cambios para esta versión:[/B] <news>[B]Estos son los cambios para esta versión:[/B]
[COLOR green][B]Arreglos[/B][/COLOR] [COLOR green][B]Arreglos[/B][/COLOR]
[I]- serieslan [I]- cinetux
- streamplay - vidoza
- descargasmix - canalpelis
- canalpelis - Canal nuevo - pelisplanet
- newpct1
- pelisplus
- torrentlocura - fix para usar videoteca y en mediaserver
- fixes internos[/I] - fixes internos[/I]
[COLOR green]Gracias a [COLOR yellow][B]xabier100[/B][/COLOR] y [COLOR yellow][B]fermintxu[/B][/COLOR] por su colaboración en esta versión[/COLOR]
[COLOR green]Gracias a [COLOR yellow][B]msdos[/B][/COLOR] por su colaboración en esta versión[/COLOR]
</news> </news>
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description> <description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
<summary lang="en">Browse web pages using Kodi</summary> <summary lang="en">Browse web pages using Kodi</summary>
@@ -38,6 +38,8 @@
"visible": true, "visible": true,
"lvalues": [ "lvalues": [
"Sin color", "Sin color",
"Perfil 5",
"Perfil 4",
"Perfil 3", "Perfil 3",
"Perfil 2", "Perfil 2",
"Perfil 1" "Perfil 1"
+3 -2
View File
@@ -127,7 +127,7 @@ def peliculas(item):
data = httptools.downloadpage(item.url).data data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", data) data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", data)
# logger.info(data) logger.info(data)
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title.strip() patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title.strip()
patron += '<span class="icon-star2"></span>(.*?)/div>.*?' # rating patron += '<span class="icon-star2"></span>(.*?)/div>.*?' # rating
@@ -138,7 +138,8 @@ def peliculas(item):
matches = scrapertools.find_multiple_matches(data, patron) matches = scrapertools.find_multiple_matches(data, patron)
for scrapedthumbnail, scrapedtitle, rating, calidad, scrapedurl, year in matches[item.page:item.page + 20]: for scrapedthumbnail, scrapedtitle, rating, calidad, scrapedurl, year in matches[item.page:item.page + 20]:
if 'Próximamente' not in calidad: if 'Próximamente' not in calidad and '-XXX.jpg' not in scrapedthumbnail:
scrapedtitle = scrapedtitle.replace('Ver ', '').strip() scrapedtitle = scrapedtitle.replace('Ver ', '').strip()
contentTitle = scrapedtitle.partition(':')[0].partition(',')[0] contentTitle = scrapedtitle.partition(':')[0].partition(',')[0]
title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % ( title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (
+14 -9
View File
@@ -314,15 +314,11 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
url = scrapertools.find_single_match(bloque1, patron) url = scrapertools.find_single_match(bloque1, patron)
if "goo.gl" in url: if "goo.gl" in url:
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "") url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
if "www.cinetux.me" in url: matches.append([url, "", "", language.strip(), t_tipo])
server = scrapertools.find_single_match(url, "player/(.*?)\.")
else:
server = servertools.get_server_from_url(url)
matches.append([url, server, "", language.strip(), t_tipo])
bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single') bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single')
bloque2 = bloque2.replace("\t", "").replace("\r", "") bloque2 = bloque2.replace("\t", "").replace("\r", "")
patron = '(?s)optn" href="([^"]+)' patron = '(?s)optn" href="([^"]+)'
patron += '.*?title="([^"]+)' patron += '.*?title="([^\.]+)'
patron += '.*?src.*?src="[^>]+"?/>([^<]+)' patron += '.*?src.*?src="[^>]+"?/>([^<]+)'
patron += '.*?src="[^>]+"?/>([^<]+)' patron += '.*?src="[^>]+"?/>([^<]+)'
patron += '.*?/span>([^<]+)' patron += '.*?/span>([^<]+)'
@@ -336,7 +332,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
scrapedtipo = match[4] scrapedtipo = match[4]
if t_tipo.upper() not in scrapedtipo.upper(): if t_tipo.upper() not in scrapedtipo.upper():
continue continue
title = " Mirror en " + scrapedserver.split(".")[0] + " (" + scrapedlanguage + ")" title = " Mirror en %s (" + scrapedlanguage + ")"
if len(scrapedcalidad.strip()) > 0: if len(scrapedcalidad.strip()) > 0:
title += " (Calidad " + scrapedcalidad.strip() + ")" title += " (Calidad " + scrapedcalidad.strip() + ")"
@@ -357,6 +353,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
title = "Mostrar enlaces filtrados en %s" % ", ".join(filtrados) title = "Mostrar enlaces filtrados en %s" % ", ".join(filtrados)
lista_enlaces.append(item.clone(title=title, action="findvideos", url=item.url, text_color=color3, lista_enlaces.append(item.clone(title=title, action="findvideos", url=item.url, text_color=color3,
filtro=True)) filtro=True))
lista_enlaces = servertools.get_servers_itemlist(lista_enlaces, lambda i: i.title % i.server.capitalize())
return lista_enlaces return lista_enlaces
@@ -368,7 +365,6 @@ def play(item):
data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "") data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "")
id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"') id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"')
item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id
itemlist = servertools.find_video_items(data=item.url)
elif "links" in item.url or "www.cinetux.me" in item.url: elif "links" in item.url or "www.cinetux.me" in item.url:
data = httptools.downloadpage(item.url).data data = httptools.downloadpage(item.url).data
scrapedurl = scrapertools.find_single_match(data, '<a href="(http[^"]+)') scrapedurl = scrapertools.find_single_match(data, '<a href="(http[^"]+)')
@@ -380,7 +376,16 @@ def play(item):
scrapedurl = httptools.downloadpage(scrapedurl, follow_redirects=False, only_headers=True).headers.get( scrapedurl = httptools.downloadpage(scrapedurl, follow_redirects=False, only_headers=True).headers.get(
"location", "") "location", "")
item.url = scrapedurl item.url = scrapedurl
itemlist = servertools.find_video_items(data=item.url)
else: else:
return [item] return [item]
itemlist.append(
Item(channel = item.channel,
action = "play",
title = "%s",
fulltitle = item.fulltitle,
thumbnail = item.thumbnail,
server = "",
url = item.url
))
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
return itemlist return itemlist
+19 -14
View File
@@ -13,10 +13,15 @@ def mainlist(item):
logger.info() logger.info()
itemlist = [] itemlist = []
thumb_pelis=get_thumb("channels_movie.png")
thumb_series=get_thumb("channels_tvshow.png")
itemlist.append(Item(channel=item.channel, action="submenu", title="Películas", url="http://www.newpct1.com/", itemlist.append(Item(channel=item.channel, action="submenu", title="Películas", url="http://www.newpct1.com/",
extra="peliculas")) extra="peliculas", thumbnail=thumb_pelis ))
itemlist.append(
Item(channel=item.channel, action="submenu", title="Series", url="http://www.newpct1.com/", extra="series")) itemlist.append(Item(channel=item.channel, action="submenu", title="Series", url="http://www.newpct1.com/", extra="series",
thumbnail=thumb_series))
# itemlist.append(Item(channel=item.channel, action="search", title="Buscar")) # itemlist.append(Item(channel=item.channel, action="search", title="Buscar"))
return itemlist return itemlist
@@ -131,22 +136,22 @@ def listado(item):
1).strip() 1).strip()
# logger.info("[newpct1.py] titulo="+title) # logger.info("[newpct1.py] titulo="+title)
''' '''
if len(title)>3: if len(title)>3:
url_i = 'http://www.newpct1.com/index.php?page=buscar&url=&letter=&q=%22' + title.replace(" ","%20") + '%22' url_i = 'http://www.newpct1.com/index.php?page=buscar&url=&letter=&q=%22' + title.replace(" ","%20") + '%22'
else: else:
url_i = 'http://www.newpct1.com/index.php?page=buscar&url=&letter=&q=' + title url_i = 'http://www.newpct1.com/index.php?page=buscar&url=&letter=&q=' + title
if "1.com/series-hd" in url: if "1.com/series-hd" in url:
extra="serie-hd" extra="serie-hd"
url = url_i + '&categoryID=&categoryIDR=1469&calidad=' + calidad.replace(" ","+") #DTV+720p+AC3+5.1 url = url_i + '&categoryID=&categoryIDR=1469&calidad=' + calidad.replace(" ","+") #DTV+720p+AC3+5.1
elif "1.com/series-vo" in url: elif "1.com/series-vo" in url:
extra="serie-vo" extra="serie-vo"
url = url_i + '&categoryID=&categoryIDR=775&calidad=' + calidad.replace(" ","+") #HDTV+720p+AC3+5.1 url = url_i + '&categoryID=&categoryIDR=775&calidad=' + calidad.replace(" ","+") #HDTV+720p+AC3+5.1
elif "1.com/series/" in url: elif "1.com/series/" in url:
extra="serie-tv" extra="serie-tv"
url = url_i + '&categoryID=&categoryIDR=767&calidad=' + calidad.replace(" ","+") url = url_i + '&categoryID=&categoryIDR=767&calidad=' + calidad.replace(" ","+")
url += '&idioma=&ordenar=Nombre&inon=Descendente' url += '&idioma=&ordenar=Nombre&inon=Descendente'
''' '''
else: else:
title = title.replace("Descargar", "", 1).strip() title = title.replace("Descargar", "", 1).strip()
@@ -180,7 +185,7 @@ def listado(item):
paginacion = scrapertools.get_match(data, patron) paginacion = scrapertools.get_match(data, patron)
if "Next" in paginacion: if "Next" in paginacion:
url_next_page = scrapertools.get_match(paginacion, '<a href="([^>]+)>Next</a>')[:-1].replace(" ", "%20") url_next_page = scrapertools.get_match(paginacion, '<a href="(http[^>]+)>Next</a>')[:-1].replace(" ", "%20")
itemlist.append(Item(channel=item.channel, action="listado", title=">> Página siguiente", url=url_next_page, itemlist.append(Item(channel=item.channel, action="listado", title=">> Página siguiente", url=url_next_page,
extra=item.extra)) extra=item.extra))
# logger.info("[newpct1.py] listado items:" + str(len(itemlist))) # logger.info("[newpct1.py] listado items:" + str(len(itemlist)))
@@ -203,7 +208,7 @@ def completo(item):
if item.extra != "serie_add": if item.extra != "serie_add":
''' '''
# Afinar mas la busqueda # Afinar mas la busqueda
if item_extra=="serie-hd": if item_extra=="serie-hd":
categoryID=buscar_en_subcategoria(item.show,'1469') categoryID=buscar_en_subcategoria(item.show,'1469')
elif item_extra=="serie-vo": elif item_extra=="serie-vo":
@@ -369,7 +374,7 @@ def get_episodios(item):
paginacion = scrapertools.get_match(data, patron) paginacion = scrapertools.get_match(data, patron)
# logger.info("[newpct1.py] get_episodios: paginacion= " + paginacion) # logger.info("[newpct1.py] get_episodios: paginacion= " + paginacion)
if "Next" in paginacion: if "Next" in paginacion:
url_next_page = scrapertools.get_match(paginacion, '<a href="([^>]+)>Next</a>')[:-1] url_next_page = scrapertools.get_match(paginacion, '<a href="(http[^>]+)>Next</a>')[:-1]
url_next_page = url_next_page.replace(" ", "%20") url_next_page = url_next_page.replace(" ", "%20")
# logger.info("[newpct1.py] get_episodios: url_next_page= " + url_next_page) # logger.info("[newpct1.py] get_episodios: url_next_page= " + url_next_page)
itemlist.append( itemlist.append(
+2 -8
View File
@@ -38,19 +38,13 @@
"visible": true, "visible": true,
"lvalues": [ "lvalues": [
"Sin color", "Sin color",
"Perfil 5",
"Perfil 4",
"Perfil 3", "Perfil 3",
"Perfil 2", "Perfil 2",
"Perfil 1" "Perfil 1"
] ]
}, },
{
"id": "orden_episodios",
"type": "bool",
"label": "Mostrar los episodios de las series en orden descendente",
"default": false,
"enabled": true,
"visible": true
},
{ {
"id": "include_in_newest_peliculas", "id": "include_in_newest_peliculas",
"type": "bool", "type": "bool",
+328 -274
View File
@@ -1,274 +1,328 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re
import urlparse import sys
import urllib
from core import channeltools import urlparse
from core import httptools from platformcode import config, logger
from core import scrapertools from core import httptools
from core import servertools from core import scrapertools
from core import tmdb from core import servertools
from core.item import Item from core.item import Item
from platformcode import config, logger from core import channeltools
from core import tmdb
host = "http://www.pelisplanet.com/"
host = "http://www.pelisplanet.com/"
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
['Referer', host]] headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
['Referer', host]]
parameters = channeltools.get_channel_parameters('pelisplanet')
fanart_host = parameters['fanart'] __channel__ = "pelisplanet"
thumbnail_host = parameters['thumbnail'] parameters = channeltools.get_channel_parameters('pelisplanet')
color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] fanart_host = parameters['fanart']
thumbnail_host = parameters['thumbnail']
try:
def mainlist(item): __modo_grafico__ = config.get_setting('modo_grafico', __channel__)
logger.info() __perfil__ = int(config.get_setting('perfil', __channel__))
itemlist = [] except:
item.url = host __modo_grafico__ = True
item.text_color = color1 __perfil__ = 0
item.fanart = fanart_host
thumbnail = "https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/%s.png" # Fijar perfil de color
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
itemlist.append(item.clone(title="Novedades", action="peliculas", text_blod=True, ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
viewcontent='movies', thumbnail=thumbnail % 'novedades', ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
viewmode="movie_with_plot")) if __perfil__ < 3:
color1, color2, color3, color4, color5 = perfil[__perfil__]
itemlist.append(item.clone(title="Estrenos", action="peliculas", text_blod=True, else:
url=host + 'genero/estrenos/', thumbnail=thumbnail % 'estrenos')) color1 = color2 = color3 = color4 = color5 = ""
itemlist.append(item.clone(title="Géneros", action="generos", text_blod=True, def mainlist(item):
viewcontent='movies', thumbnail=thumbnail % 'generos', logger.info()
viewmode="movie_with_plot", url=host + 'generos/')) itemlist = []
item.url = host
itemlist.append(Item(channel=item.channel, title="Filtrar por Idiomas", item.text_color = color1
fanart=fanart_host, folder=False, text_color=color3, item.fanart = fanart_host
text_blod=True, thumbnail=thumbnail % 'idiomas')) thumbnail = "https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/%s.png"
itemlist.append(item.clone(title="Castellano", action="peliculas", text_blod=True, itemlist.append(item.clone(title="Novedades", action="peliculas", text_blod=True,
viewcontent='movies', thumbnail=thumbnail % 'castellano', viewcontent='movies', thumbnail=thumbnail % 'novedades',
viewmode="movie_with_plot", url=host + 'idioma/castellano/')) viewmode="movie_with_plot"))
itemlist.append(item.clone(title="Latino", action="peliculas", text_blod=True, itemlist.append(item.clone(title="Estrenos", action="peliculas", text_blod=True,
viewcontent='movies', thumbnail=thumbnail % 'latino', url=host + 'genero/estrenos/', thumbnail=thumbnail % 'estrenos'))
viewmode="movie_with_plot", url=host + 'idioma/latino/'))
itemlist.append(item.clone(title="Géneros", action="generos", text_blod=True,
itemlist.append(item.clone(title="Buscar por Título o Actor", action="search", text_blod=True, viewcontent='movies', thumbnail=thumbnail % 'generos',
thumbnail=thumbnail % 'busqueda', url=host)) viewmode="movie_with_plot", url=host + 'generos/'))
return itemlist
itemlist.append(Item(channel=item.channel, title="Filtrar por Idiomas",
fanart=fanart_host, folder=False, text_color=color3,
def search(item, texto): text_blod=True, thumbnail=thumbnail % 'idiomas'))
logger.info()
itemlist.append(item.clone(title="Castellano", action="peliculas", text_blod=True,
texto = texto.replace(" ", "+") viewcontent='movies', thumbnail=thumbnail % 'castellano',
item.url = urlparse.urljoin(item.url, "?s={0}".format(texto)) viewmode="movie_with_plot", url=host + 'idioma/castellano/'))
try: itemlist.append(item.clone(title="Latino", action="peliculas", text_blod=True,
return sub_search(item) viewcontent='movies', thumbnail=thumbnail % 'latino',
viewmode="movie_with_plot", url=host + 'idioma/latino/'))
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
except: itemlist.append(item.clone(title="Buscar por Título o Actor", action="search", text_blod=True,
import sys thumbnail=thumbnail % 'busqueda', url=host))
for line in sys.exc_info(): return itemlist
logger.error("{0}".format(line))
return []
def search(item, texto):
logger.info()
def sub_search(item):
logger.info() texto = texto.replace(" ", "+")
item.url = urlparse.urljoin(item.url, "?s={0}".format(texto))
itemlist = []
data = httptools.downloadpage(item.url).data try:
data = re.sub(r"\n|\r|\t|&nbsp;|<br>", "", data) return sub_search(item)
# logger.info(data)
patron = '<div class="img">.*?<a href="(?P<url>[^"]+)" title="(?P<name>[^"]+)".*?' # Se captura la excepción, para no interrumpir al buscador global si un canal falla
patron += '<img.+?src="(?P<img>[^"]+)".*?\(([^\)]+)\)"> </a></div>.*?' except:
patron += 'Ver\s(.*?)\sOnline' import sys
matches = re.compile(patron, re.DOTALL).findall(data) for line in sys.exc_info():
logger.error("{0}".format(line))
for url, name, img, year, scrapedinfo in matches: return []
contentTitle = scrapertools.decodeHtmlentities(scrapedinfo.strip())
plot = item.plot
itemlist.append(item.clone(title=name, url=url, contentTitle=contentTitle, def sub_search(item):
plot=plot, action="findvideos", infoLabels={"year": year}, logger.info()
thumbnail=img, text_color=color3))
itemlist = []
paginacion = scrapertools.find_single_match( data = httptools.downloadpage(item.url).data
data, '<a class="page larger" href="([^"]+)">\d+</a>') data = re.sub(r"\n|\r|\t|&nbsp;|<br>", "", data)
# logger.info(data)
if paginacion: patron = '<div class="img">.*?<a href="(?P<url>[^"]+)" title="(?P<name>[^"]+)".*?'
itemlist.append(Item(channel=item.channel, action="sub_search", patron += '<img.+?src="(?P<img>[^"]+)".*?\(([^\)]+)\)"> </a></div>.*?'
title="» Siguiente »", url=paginacion, patron += 'Ver\s(.*?)\sOnline'
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/next.png')) matches = re.compile(patron, re.DOTALL).findall(data)
tmdb.set_infoLabels(itemlist) for url, name, img, year, scrapedinfo in matches:
contentTitle = scrapertools.decodeHtmlentities(scrapedinfo.strip())
for item in itemlist: plot = item.plot
if item.infoLabels['plot'] == '': itemlist.append(item.clone(title=name, url=url, contentTitle=contentTitle,
data = httptools.downloadpage(item.url).data plot=plot, action="findvideos", infoLabels={"year": year},
item.fanart = scrapertools.find_single_match( thumbnail=img, text_color=color3))
data, 'meta property="og:image" content="([^"]+)" \/>')
item.plot = scrapertools.find_single_match(data, paginacion = scrapertools.find_single_match(
'Castellano</h3>\s*<p>(.+?)<strong>') data, '<a class="page larger" href="([^"]+)">\d+</a>')
item.plot = scrapertools.htmlclean(item.plot)
if paginacion:
return itemlist itemlist.append(Item(channel=item.channel, action="sub_search",
title="» Siguiente »", url=paginacion,
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/next.png'))
def newest(categoria):
logger.info() tmdb.set_infoLabels(itemlist)
itemlist = []
item = Item() for item in itemlist:
try: if item.infoLabels['plot'] == '':
if categoria == 'peliculas': data = httptools.downloadpage(item.url).data
item.url = host item.fanart = scrapertools.find_single_match(
elif categoria == 'infantiles': data, 'meta property="og:image" content="([^"]+)" \/>')
item.url = host + "genero/animacion-e-infantil/" item.plot = scrapertools.find_single_match(data,
else: 'Castellano</h3>\s*<p>(.+?)<strong>')
return [] item.plot = scrapertools.htmlclean(item.plot)
itemlist = peliculas(item) return itemlist
if itemlist[-1].title == "» Siguiente »":
itemlist.pop()
def newest(categoria):
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla logger.info()
except: itemlist = []
import sys item = Item()
for line in sys.exc_info(): try:
logger.error("{0}".format(line)) if categoria == 'peliculas':
return [] item.url = host
elif categoria == 'infantiles':
return itemlist item.url = host + "genero/animacion-e-infantil/"
else:
return []
def peliculas(item):
logger.info() itemlist = peliculas(item)
itemlist = [] if itemlist[-1].title == "» Siguiente »":
itemlist.pop()
data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", data) # Se captura la excepción, para no interrumpir al canal novedades si un canal falla
patron_todas = '<div class="home-movies">(.*?)<footer>' except:
data = scrapertools.find_single_match(data, patron_todas) import sys
patron = 'col-sm-5"><a href="(?P<scrapedurl>[^"]+)".+?' for line in sys.exc_info():
patron += 'browse-movie-link-qd.*?>(?P<calidad>[^>]+)</.+?' logger.error("{0}".format(line))
patron += '<p>(?P<year>[^>]+)</p>.+?' return []
patron += 'title one-line">(?P<scrapedtitle>[^>]+)</h2>.+?'
patron += 'img-responsive" src="(?P<scrapedthumbnail>[^"]+)".*?' return itemlist
matches = re.compile(patron, re.DOTALL).findall(data)
def peliculas(item):
for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches: logger.info()
datas = httptools.downloadpage(scrapedurl).data itemlist = []
datas = re.sub(r"\n|\r|\t|\s{2}|&nbsp;", "", datas)
# logger.info(datas) data = httptools.downloadpage(item.url).data
if '/ ' in scrapedtitle: data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", data)
scrapedtitle = scrapedtitle.partition('/ ')[2] patron_todas = '<div class="home-movies">(.*?)<footer>'
contentTitle = scrapertools.find_single_match(datas, '<em class="pull-left">Titulo original: </em>([^<]+)</p>') data = scrapertools.find_single_match(data, patron_todas)
contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip()) patron = 'col-sm-5"><a href="(?P<scrapedurl>[^"]+)".+?'
rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" /></a><span>([^<]+)</span>') patron += 'browse-movie-link-qd.*?>(?P<calidad>[^>]+)</.+?'
director = scrapertools.find_single_match(datas, patron += '<p>(?P<year>[^>]+)</p>.+?'
'<div class="list-cast-info tableCell"><a href="[^"]+" rel="tag">([^<]+)</a></div>') patron += 'title one-line">(?P<scrapedtitle>[^>]+)</h2>.+?'
title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper()) patron += 'img-responsive" src="(?P<scrapedthumbnail>[^"]+)".*?'
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, plot='', matches = re.compile(patron, re.DOTALL).findall(data)
url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail,
contentTitle=contentTitle, for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches:
infoLabels={"year": year, 'rating': rating, 'director': director}, datas = httptools.downloadpage(scrapedurl).data
text_color=color3)) datas = re.sub(r"\n|\r|\t|\s{2}|&nbsp;", "", datas)
#logger.info(datas)
tmdb.set_infoLabels(itemlist, seekTmdb=True) if '/ ' in scrapedtitle:
scrapedtitle = scrapedtitle.partition('/ ')[2]
paginacion = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">') contentTitle = scrapertools.find_single_match(datas, '<em class="pull-left">Titulo original: </em>([^<]+)</p>')
if paginacion: contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip())
itemlist.append(Item(channel=item.channel, action="peliculas", rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" /></a><span>([^<]+)</span>')
title="» Siguiente »", url=paginacion, plot="Página Siguiente", director = scrapertools.find_single_match(datas, '<div class="list-cast-info tableCell"><a href="[^"]+" rel="tag">([^<]+)</a></div>')
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/next.png')) title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper())
for item in itemlist: itemlist.append(Item(channel=item.channel, action="findvideos", title=title, plot='',
if item.infoLabels['plot'] == '': url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail,
data = httptools.downloadpage(item.url).data contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director},
item.fanart = scrapertools.find_single_match(data, 'meta property="og:image" content="([^"]+)" \/>') text_color=color3))
item.plot = scrapertools.find_single_match(data, 'Castellano</h3>\s*<p>(.+?)<strong>')
item.plot = scrapertools.htmlclean(item.plot) tmdb.set_infoLabels(itemlist, __modo_grafico__)
tmdb.set_infoLabels(itemlist, __modo_grafico__)
return itemlist
paginacion = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
if paginacion:
def generos(item):
logger.info() itemlist.append(Item(channel=item.channel, action="peliculas",
itemlist = [] title="» Siguiente »", url=paginacion, plot="Página Siguiente",
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/next.png'))
data = scrapertools.cache_page(item.url)
data = re.sub(r"\n|\r|\t|\s{2}|&nbsp;", "", data) for item in itemlist:
# logger.info(data) if item.infoLabels['plot'] == '':
patron = '<div class="todos">.*?' data = httptools.downloadpage(item.url).data
patron += '<a href="([^"]+)".*?' item.fanart = scrapertools.find_single_match(data, 'meta property="og:image" content="([^"]+)" \/>')
patron += 'title="([^"]+)".*?' item.plot = scrapertools.find_single_match(data, 'Castellano</h3>\s*<p>(.+?)<strong>')
patron += '<img src="([^"]+)"' item.plot = scrapertools.htmlclean(item.plot)
matches = re.compile(patron, re.DOTALL).findall(data)
return itemlist
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle,
url=scrapedurl, text_color=color3, thumbnail=scrapedthumbnail, def generos(item):
plot="", viewmode="movie_with_plot", folder=True)) logger.info()
itemlist = []
return itemlist
data = scrapertools.cache_page(item.url)
data = re.sub(r"\n|\r|\t|\s{2}|&nbsp;", "", data)
def findvideos(item): # logger.info(data)
logger.info() patron = '<div class="todos">.*?'
itemlist = [] patron += '<a href="([^"]+)".*?'
patron += 'title="([^"]+)".*?'
datas = httptools.downloadpage(item.url).data patron += '<img src="([^"]+)"'
datas = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", datas) matches = re.compile(patron, re.DOTALL).findall(data)
# logger.info(data)
patron = '<a style="cursor:pointer; cursor: hand;" rel="([^"]+)".*?' for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
patron += 'clearfix colores title_calidad">.*?<span>([^<]+)</span></a>' itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle,
url=scrapedurl, text_color=color3, thumbnail=scrapedthumbnail,
matches = re.compile(patron, re.DOTALL).findall(datas) plot="", viewmode="movie_with_plot", folder=True))
for scrapedurl, servidores, in matches: return itemlist
if 'pelispp.com' or 'ultrapelis' in scrapedurl:
data = httptools.downloadpage(scrapedurl, headers=headers).data
patronr = 'file: "([^"]+)",label:"([^"]+)",type' def findvideos(item):
matchesr = re.compile(patronr, re.DOTALL).findall(data) logger.info()
for scrapedurl, label in matchesr: itemlist = []
url = scrapedurl.replace('\\', '')
language = 'latino' datas = httptools.downloadpage(item.url).data
quality = label.decode('cp1252').encode('utf8') datas = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}|&nbsp;", "", datas)
title = item.contentTitle + ' (' + str(label) + ')' # logger.info(data)
thumbnail = item.thumbnail patron = '<a style="cursor:pointer; cursor: hand;" rel="([^"]+)".*?'
fanart = item.fanart patron += 'clearfix colores title_calidad">.*?<span>([^<]+)</span></a>'
itemlist.append(item.clone(action="play", title=title, url=url, server='directo',
thumbnail=thumbnail, fanart=fanart, extra='directo', matches = re.compile(patron, re.DOTALL).findall(datas)
quality=quality, language=language, ))
itemlist.sort(key=lambda it: it.title, reverse=True) for scrapedurl, servidores, in matches:
if 'youtube' in scrapedurl:
# if 'youtube' not in scrapedurl: video_urls = []
if 'youtube' not in scrapedurl: doc_id = scrapertools.find_single_match(scrapedurl, "docid=(\w+)")
quality = scrapertools.find_single_match( doc_url = "http://docs.google.com/get_video_info?docid=%s" % doc_id
datas, '<p class="hidden-xs hidden-sm">.*?class="magnet-download">([^<]+)p</a>') response = httptools.downloadpage(doc_url, cookies=False)
title = "[COLOR green]%s[/COLOR] [COLOR yellow][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % ( cookies = ""
item.contentTitle, quality.upper(), servidores.capitalize()) cookie = response.headers["set-cookie"].split("HttpOnly, ")
url = scrapedurl.replace('\\', '') for c in cookie:
thumbnail = item.thumbnail cookies += c.split(";", 1)[0] + "; "
server = servertools.get_server_from_url(url) data = response.data.decode('unicode-escape')
data = urllib.unquote_plus(urllib.unquote_plus(data))
itemlist.append(item.clone(action='play', title=title, url=url, quality=quality, headers_string = "|Cookie=" + cookies
server=server, text_color=color3, thumbnail=thumbnail)) url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)')
streams = scrapertools.find_multiple_matches(url_streams,
for videoitem in itemlist: 'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))')
videoitem.infoLabels = item.infoLabels itags = {'18':'360p', '22':'720p', '34':'360p', '35':'480p', '37':'1080p', '43':'360p', '59':'480p'}
videoitem.channel = item.channel for itag, video_url in streams:
videoitem.action = 'play' video_url += headers_string
videoitem.fulltitle = item.title video_urls.append([video_url, itags[itag]])
if config.get_videolibrary_support() and len(itemlist) > 0: for video_item in video_urls:
itemlist.append(Item(channel=item.channel, calidad = video_item[1]
title='[COLOR yellow]Añadir esta pelicula a la biblioteca[/COLOR]', title = '%s [COLOR green](%s)[/COLOR] [COLOR green]([/COLOR][COLOR black]You[/COLOR][COLOR red]tube[/COLOR][COLOR green])[/COLOR]'%(item.contentTitle, calidad)
url=item.url, action="add_pelicula_to_library", url = video_item[0]
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/libreria.png',
extra="findvideos", contentTitle=item.contentTitle)) itemlist.append(
item.clone(channel=item.channel,
return itemlist action='play',
title=title,
url= url,
thumbnail=item.thumbnail,
plot=item.plot,
fanart=item.fanart,
contentTitle=item.contentTitle,
server='directo',
context = item.context
))
itemlist.sort(key=lambda it: it.title, reverse=True)
if 'pelispp.com' or 'ultrapelis' in scrapedurl:
data = httptools.downloadpage(scrapedurl, headers=headers).data
patronr = 'file: "([^"]+)",label:"([^"]+)",type'
matchesr = re.compile(patronr, re.DOTALL).findall(data)
for scrapedurl, label in matchesr:
url = scrapedurl.replace('\\', '')
language = 'latino'
quality = label.decode('cp1252').encode('utf8')
title = item.contentTitle + ' (' + str(label) + ') ([COLOR blue]G[/COLOR][COLOR red]o[/COLOR][COLOR yellow]o[/COLOR][COLOR blue]g[/COLOR][COLOR green]l[/COLOR][COLOR red]e[/COLOR])'
thumbnail = item.thumbnail
fanart = item.fanart
itemlist.append(item.clone(action="play", title=title, url=url, server='directo',
thumbnail=thumbnail, fanart=fanart, extra='directo',
quality=quality, language=language,))
itemlist.sort(key=lambda it: it.title, reverse=True)
# if 'youtube' not in scrapedurl:
servidores.lower()
if 'youtube' not in scrapedurl and 'pelispp.com' not in scrapedurl and 'streamplus' not in servidores:
quality = scrapertools.find_single_match(
datas, '<p class="hidden-xs hidden-sm">.*?class="magnet-download">([^<]+)p</a>')
title = "[COLOR green]%s[/COLOR] [COLOR yellow][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (
item.contentTitle, quality.upper(), servidores.capitalize())
url = scrapedurl.replace('\\', '')
thumbnail = item.thumbnail
server = servertools.get_server_from_url(url)
itemlist.append(item.clone(action='play', title=title, url=url, quality=quality,
server=server, text_color=color3, thumbnail=thumbnail))
for videoitem in itemlist:
videoitem.infoLabels = item.infoLabels
videoitem.channel = item.channel
videoitem.action = 'play'
videoitem.fulltitle = item.title
if config.get_videolibrary_support() and len(itemlist) > 0:
itemlist.append(Item(channel=item.channel,
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
url=item.url, action="add_pelicula_to_library",
thumbnail='https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/libreria.png',
extra="findvideos", contentTitle=item.contentTitle))
return itemlist
+3 -1
View File
@@ -44,7 +44,9 @@
"latino", "latino",
"movie", "movie",
"tvshow", "tvshow",
"documentary" "documentary",
"direct"
], ],
"settings": [ "settings": [
{ {
+46 -44
View File
@@ -9,6 +9,7 @@ from core import scrapertools
from core import tmdb from core import tmdb
from core.item import Item from core.item import Item
from platformcode import config, logger from platformcode import config, logger
from core import servertools
host = "http://www.pelisplus.tv/" host = "http://www.pelisplus.tv/"
@@ -25,10 +26,11 @@ list_quality = ['1080p',
'720p', '720p',
'480p', '480p',
'360p', '360p',
'240p' '240p',
'default'
] ]
list_servers = [ list_servers = [
'directo', 'gvideo',
'openload', 'openload',
'thevideos' 'thevideos'
] ]
@@ -419,65 +421,65 @@ def findvideos(item):
logger.info() logger.info()
itemlist = [] itemlist = []
duplicados = [] duplicados = []
datas = httptools.downloadpage(item.url).data data = httptools.downloadpage(item.url).data
patron = "<iframe.*?src='([^']+)' frameborder='0' allowfullscreen.*?" logger.debug('data: %s'%data)
matches = re.compile(patron, re.DOTALL).findall(datas) video_page = scrapertools.find_single_match(data, "<iframe width='100%' height='500' src='(.*?)' frameborder='0'")
data = httptools.downloadpage(video_page).data
patron = '<li data-id=".*?">\s+<a href="(.*?)" >'
matches = re.compile(patron, re.DOTALL).findall(data)
for scrapedurl in matches: for scrapedurl in matches:
if 'elreyxhd' or 'pelisplus.biz' in scrapedurl: if 'tipo' in scrapedurl:
patronr = '' server = 'gvideo'
data = httptools.downloadpage(scrapedurl, headers=headers).data gvideo_data = httptools.downloadpage(scrapedurl).data
video_url = scrapertools.find_single_match(gvideo_data,'<div id="player">.*?border: none" src="\/\/(.*?)" ')
video_url= 'http://%s'%video_url
gvideo_url = httptools.downloadpage(video_url).data
videourl = servertools.findvideosbyserver(gvideo_url, server)
quote = scrapertools.find_single_match(data, 'sources.*?file.*?http') logger.debug('videourl: %s'%videourl)
if quote and "'" in quote: language = 'latino'
patronr = "file:'([^']+)',label:'([^.*?]+)',type:.*?'.*?}" quality = 'default'
elif '"' in quote: url = videourl[0][1]
patronr = '{file:"(.*?)",label:"(.*?)"}' title = '%s (%s)'%(item.contentTitle, server)
if patronr != '': thumbnail = item.thumbnail
matchesr = re.compile(patronr, re.DOTALL).findall(data) fanart = item.fanart
if video_url not in duplicados:
itemlist.append(item.clone(action="play",
title=title,
url=url,
thumbnail=thumbnail,
fanart=fanart,
show=title,
extra='gvideo',
language=language,
quality=quality,
server=server
))
duplicados.append(video_url)
for scrapedurl, scrapedcalidad in matchesr:
url = scrapedurl
language = 'latino'
quality = scrapedcalidad.decode('cp1252').encode('utf8')
title = item.contentTitle + ' (' + str(scrapedcalidad) + ')'
thumbnail = item.thumbnail
fanart = item.fanart
if url not in duplicados:
itemlist.append(item.clone(action="play",
title=title,
url=url,
thumbnail=thumbnail,
fanart=fanart,
show=title,
extra='directo',
language=language,
quality=quality,
server='directo',
))
duplicados.append(url)
url = scrapedurl
from core import servertools
itemlist.extend(servertools.find_video_items(data=datas)) itemlist.extend(servertools.find_video_items(data=data))
for videoitem in itemlist: for videoitem in itemlist:
# videoitem.infoLabels = item.infoLabels # videoitem.infoLabels = item.infoLabels
videoitem.channel = item.channel videoitem.channel = item.channel
if videoitem.quality == '' or videoitem.language == '': if videoitem.quality == '' or videoitem.language == '':
videoitem.quality = 'default' videoitem.quality = 'default'
videoitem.language = 'Latino' videoitem.language = 'Latino'
if videoitem.server != '': if videoitem.server != '':
videoitem.thumbnail = servertools.guess_server_thumbnail(videoitem.server) videoitem.thumbnail = servertools.guess_server_thumbnail(videoitem.server)
else: else:
videoitem.thumbnail = item.thumbnail videoitem.thumbnail = item.thumbnail
videoitem.server = 'directo' videoitem.server = 'directo'
videoitem.action = 'play' videoitem.action = 'play'
videoitem.fulltitle = item.title videoitem.fulltitle = item.title
if videoitem.extra != 'directo' and 'youtube' not in videoitem.url: if videoitem.extra != 'directo' and 'youtube' not in videoitem.url:
videoitem.title = item.contentTitle + ' (' + videoitem.server + ')' videoitem.title = item.contentTitle + ' (' + videoitem.server + ')'
n = 0 n = 0
for videoitem in itemlist: for videoitem in itemlist:
+3 -14
View File
@@ -6,23 +6,12 @@
"language": "es", "language": "es",
"banner": "torrentlocura.png", "banner": "torrentlocura.png",
"thumbnail": "http://imgur.com/EWmLS3d.png", "thumbnail": "http://imgur.com/EWmLS3d.png",
"fanart": "http://imgur.com/V7QZLAL.jpg",
"version": 1, "version": 1,
"changes": [ "changes": [
{ {
"date": "31/12/2016", "date": "25/08/2017",
"description": "Release" "description": "revamp"
},
{
"date": "13/01/2017",
"description": "Añadida info a cápitulos en bloque"
},
{
"date": "04/04/2017",
"description": "Reparación cambios web"
},
{
"date": "28/06/2017",
"description": "Corrección código y algunas mejoras"
} }
], ],
"categories": [ "categories": [
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -7,9 +7,9 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": "http://www.4shared.com/flash/player.swf" "http://www.4shared.com/flash/player.swf"
}, ],
"patterns": [ "patterns": [
{ {
"pattern": "(http://www.4shared.com/embed/[A-Z0-9a-z]+/[A-Z0-9a-z]+)", "pattern": "(http://www.4shared.com/embed/[A-Z0-9a-z]+/[A-Z0-9a-z]+)",
+3 -3
View File
@@ -7,9 +7,9 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": "http://www.mp4upload.com/embed/embed" "http://www.mp4upload.com/embed/embed"
}, ],
"patterns": [ "patterns": [
{ {
"pattern": "mp4upload.com/embed-([A-Za-z0-9]+)", "pattern": "mp4upload.com/embed-([A-Za-z0-9]+)",
+15 -17
View File
@@ -11,23 +11,21 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": [ "http://streamcloud.eu/stylesheets",
"http://streamcloud.eu/stylesheets", "http://streamcloud.eu/control",
"http://streamcloud.eu/control", "http://streamcloud.eu/xupload",
"http://streamcloud.eu/xupload", "http://streamcloud.eu/js",
"http://streamcloud.eu/js", "http://streamcloud.eu/favicon",
"http://streamcloud.eu/favicon", "http://streamcloud.eu/reward",
"http://streamcloud.eu/reward", "http://streamcloud.eu/login",
"http://streamcloud.eu/login", "http://streamcloud.eu/deliver",
"http://streamcloud.eu/deliver", "http://streamcloud.eu/faq",
"http://streamcloud.eu/faq", "http://streamcloud.eu/tos",
"http://streamcloud.eu/tos", "http://streamcloud.eu/checkfiles",
"http://streamcloud.eu/checkfiles", "http://streamcloud.eu/contact",
"http://streamcloud.eu/contact", "http://streamcloud.eu/serve"
"http://streamcloud.eu/serve" ],
]
},
"patterns": [ "patterns": [
{ {
"pattern": "(streamcloud.eu/[a-z0-9]+)", "pattern": "(streamcloud.eu/[a-z0-9]+)",
+14 -16
View File
@@ -11,22 +11,20 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": [ "http://streamin.to/embed-theme.html",
"http://streamin.to/embed-theme.html", "http://streamin.to/embed-jquery.html",
"http://streamin.to/embed-jquery.html", "http://streamin.to/embed-s.html",
"http://streamin.to/embed-s.html", "http://streamin.to/embed-images.html",
"http://streamin.to/embed-images.html", "http://streamin.to/embed-faq.html",
"http://streamin.to/embed-faq.html", "http://streamin.to/embed-embed.html",
"http://streamin.to/embed-embed.html", "http://streamin.to/embed-ri.html",
"http://streamin.to/embed-ri.html", "http://streamin.to/embed-d.html",
"http://streamin.to/embed-d.html", "http://streamin.to/embed-css.html",
"http://streamin.to/embed-css.html", "http://streamin.to/embed-js.html",
"http://streamin.to/embed-js.html", "http://streamin.to/embed-player.html",
"http://streamin.to/embed-player.html", "http://streamin.to/embed-cgi.html"
"http://streamin.to/embed-cgi.html" ],
]
},
"patterns": [ "patterns": [
{ {
"pattern": "streamin.to/(?:embed-)?([a-z0-9A-Z]+)", "pattern": "streamin.to/(?:embed-)?([a-z0-9A-Z]+)",
+3 -1
View File
@@ -7,7 +7,9 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": [], "ignore_urls": [
"http://uploaded.net/file/ref"
],
"patterns": [ "patterns": [
{ {
"pattern": "(?:ul|uploaded).(?:net|to)/(?:file/|f/)?([a-zA-Z0-9]+)", "pattern": "(?:ul|uploaded).(?:net|to)/(?:file/|f/)?([a-zA-Z0-9]+)",
+2 -5
View File
@@ -7,11 +7,10 @@ from platformcode import logger
def test_video_exists(page_url): def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url) logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data data = httptools.downloadpage(page_url).data
if "Page not found" in data: if "Page not found" in data:
return False, "[vidoza] El archivo no existe o ha sido borrado" return False, "[vidoza] El archivo no existe o ha sido borrado"
elif "Video is processing now" in data: elif "processing" in data:
return False, "[vidoza] El vídeo se está procesando" return False, "[vidoza] El vídeo se está procesando"
return True, "" return True, ""
@@ -19,9 +18,7 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""): def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url) logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data data = httptools.downloadpage(page_url).data
video_urls = [] video_urls = []
matches = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)"\s*,\s*label:"([^"]+)"') matches = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)"\s*,\s*label:"([^"]+)"')
for media_url, calidad in matches: for media_url, calidad in matches:
+32 -34
View File
@@ -7,40 +7,38 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": [ "http://vidspot.net/embed-theme.html",
"http://vidspot.net/embed-theme.html", "http://vidspot.net/embed-jquery.html",
"http://vidspot.net/embed-jquery.html", "http://vidspot.net/embed-s.html",
"http://vidspot.net/embed-s.html", "http://vidspot.net/embed-images.html",
"http://vidspot.net/embed-images.html", "http://vidspot.net/embed-faq.html",
"http://vidspot.net/embed-faq.html", "http://vidspot.net/embed-embed.html",
"http://vidspot.net/embed-embed.html", "http://vidspot.net/embed-ri.html",
"http://vidspot.net/embed-ri.html", "http://vidspot.net/embed-d.html",
"http://vidspot.net/embed-d.html", "http://vidspot.net/embed-css.html",
"http://vidspot.net/embed-css.html", "http://vidspot.net/embed-js.html",
"http://vidspot.net/embed-js.html", "http://vidspot.net/embed-player.html",
"http://vidspot.net/embed-player.html", "http://vidspot.net/embed-cgi.html",
"http://vidspot.net/embed-cgi.html", "http://vidspot.net/embed-i.html",
"http://vidspot.net/embed-i.html", "http://vidspot.net/images",
"http://vidspot.net/images", "http://vidspot.net/theme",
"http://vidspot.net/theme", "http://vidspot.net/xupload",
"http://vidspot.net/xupload", "http://vidspot.net/s",
"http://vidspot.net/s", "http://vidspot.net/js",
"http://vidspot.net/js", "http://vidspot.net/jquery",
"http://vidspot.net/jquery", "http://vidspot.net/login",
"http://vidspot.net/login", "http://vidspot.net/make",
"http://vidspot.net/make", "http://vidspot.net/i",
"http://vidspot.net/i", "http://vidspot.net/faq",
"http://vidspot.net/faq", "http://vidspot.net/tos",
"http://vidspot.net/tos", "http://vidspot.net/premium",
"http://vidspot.net/premium", "http://vidspot.net/checkfiles",
"http://vidspot.net/checkfiles", "http://vidspot.net/privacy",
"http://vidspot.net/privacy", "http://vidspot.net/refund",
"http://vidspot.net/refund", "http://vidspot.net/links",
"http://vidspot.net/links", "http://vidspot.net/contact"
"http://vidspot.net/contact" ],
]
},
"patterns": [ "patterns": [
{ {
"pattern": "vidspot.(?:net/|php\\?id=)(?:embed-)?([a-z0-9]+)", "pattern": "vidspot.(?:net/|php\\?id=)(?:embed-)?([a-z0-9]+)",
+3 -3
View File
@@ -15,9 +15,9 @@
} }
], ],
"find_videos": { "find_videos": {
"ignore_urls": { "ignore_urls": [
"value": "http://www.yourupload.com/embed/embed" "http://www.yourupload.com/embed/embed"
}, ],
"patterns": [ "patterns": [
{ {
"pattern": "yourupload.com/embed/([A-z0-9]+)", "pattern": "yourupload.com/embed/([A-z0-9]+)",