fix varios 1
allcalidad: fix cambio de estructura cinefoxtv: eliminado web no existe crunchyroll: desactivado hasta ver si funciona findvideos jkanime: actualizaod por cambio de estructura miradetodo: actualizado dominio seriesmeme: eliminado web no existe documentary: servidor eliminado web no existe fileflyer : servidor eliminado web no existe filez : servidor eliminado web no existe movshare: servidor eliminado web no existe
This commit is contained in:
@@ -98,20 +98,15 @@ def peliculas(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '(?s)short_overlay.*?<a href="([^"]+)'
|
||||
patron += '.*?img.*?src="([^"]+)'
|
||||
patron += '.*?title="(.*?)"'
|
||||
patron += '.*?(Idioma.*?)post-ratings'
|
||||
|
||||
patron += '.*?title="([^"]+).*?'
|
||||
patron += 'data-postid="([^"]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, thumbnail, titulo, varios in matches:
|
||||
idioma = scrapertools.find_single_match(varios, '(?s)Idioma.*?kinopoisk">([^<]+)')
|
||||
number_idioma = scrapertools.find_single_match(idioma, '[0-9]')
|
||||
mtitulo = titulo
|
||||
if number_idioma != "":
|
||||
idioma = ""
|
||||
else:
|
||||
mtitulo += " (" + idioma + ")"
|
||||
year = scrapertools.find_single_match(varios, 'Año.*?kinopoisk">([^<]+)')
|
||||
year = scrapertools.find_single_match(year, '[0-9]{4}')
|
||||
for url, thumbnail, titulo, datapostid in matches:
|
||||
post = 'action=get_movie_details&postID=%s' %datapostid
|
||||
data1 = httptools.downloadpage(host + "wp-admin/admin-ajax.php", post=post).data
|
||||
idioma = "Latino"
|
||||
mtitulo = titulo + " (" + idioma + ")"
|
||||
year = scrapertools.find_single_match(data1, "Año:.*?(\d{4})")
|
||||
if year:
|
||||
mtitulo += " (" + year + ")"
|
||||
item.infoLabels['year'] = int(year)
|
||||
@@ -121,7 +116,6 @@ def peliculas(item):
|
||||
fulltitle = titulo,
|
||||
thumbnail = thumbnail,
|
||||
url = url,
|
||||
contentTitle = titulo,
|
||||
contentType="movie",
|
||||
language = idioma
|
||||
))
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"id": "cinefoxtv",
|
||||
"name": "CineFoxTV",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "https://s28.postimg.cc/lytn2q1tp/cinefoxtv.png",
|
||||
"banner": "cinefoxtv.png",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channelselector import get_thumb
|
||||
|
||||
host = 'http://verhdpelis.com/'
|
||||
headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
global duplicado
|
||||
global itemlist
|
||||
global temp_list
|
||||
canal = 'cinefoxtv'
|
||||
|
||||
tgenero = {"Comedia": "https://s7.postimg.cc/ne9g9zgwb/comedia.png",
|
||||
"Suspenso": "https://s13.postimg.cc/wmw6vl1cn/suspenso.png",
|
||||
"Drama": "https://s16.postimg.cc/94sia332d/drama.png",
|
||||
"Acción": "https://s3.postimg.cc/y6o9puflv/accion.png",
|
||||
"Aventuras": "https://s10.postimg.cc/6su40czih/aventura.png",
|
||||
"Animacion": "https://s13.postimg.cc/5on877l87/animacion.png",
|
||||
"Ciencia Ficcion": "https://s9.postimg.cc/diu70s7j3/cienciaficcion.png",
|
||||
"Terror": "https://s7.postimg.cc/yi0gij3gb/terror.png",
|
||||
"Documentales": "https://s16.postimg.cc/7xjj4bmol/documental.png",
|
||||
"Musical": "https://s29.postimg.cc/bbxmdh9c7/musical.png",
|
||||
"Western": "https://s23.postimg.cc/lzyfbjzhn/western.png",
|
||||
"Belico": "https://s23.postimg.cc/71itp9hcr/belica.png",
|
||||
"Crimen": "https://s4.postimg.cc/6z27zhirx/crimen.png",
|
||||
"Biográfica": "https://s15.postimg.cc/5lrpbx323/biografia.png",
|
||||
"Deporte": "https://s13.postimg.cc/xuxf5h06v/deporte.png",
|
||||
"Fantástico": "https://s10.postimg.cc/pbkbs6j55/fantastico.png",
|
||||
"Estrenos": "https://s21.postimg.cc/fy69wzm93/estrenos.png",
|
||||
"Película 18+": "https://s15.postimg.cc/exz7kysjf/erotica.png",
|
||||
"Thriller": "https://s22.postimg.cc/5y9g0jsu9/thriller.png",
|
||||
"Familiar": "https://s7.postimg.cc/6s7vdhqrf/familiar.png",
|
||||
"Romanticas": "https://s21.postimg.cc/xfsj7ua0n/romantica.png",
|
||||
"Intriga": "https://s27.postimg.cc/v9og43u2b/intriga.png",
|
||||
"Infantil": "https://s23.postimg.cc/g5rmazozv/infantil.png"}
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Todas", action="lista", thumbnail=get_thumb('all', auto=True),
|
||||
fanart='https://s18.postimg.cc/fwvaeo6qh/todas.png', extra='peliculas/',
|
||||
url=host + 'page/1.html'))
|
||||
|
||||
itemlist.append(
|
||||
itemlist[-1].clone(title="Generos", action="generos", thumbnail=get_thumb('genres', auto=True),
|
||||
fanart='https://s3.postimg.cc/5s9jg2wtf/generos.png', url=host))
|
||||
|
||||
itemlist.append(
|
||||
itemlist[-1].clone(title="Mas Vistas", action="lista", thumbnail=get_thumb('more watched', auto=True),
|
||||
fanart='https://s9.postimg.cc/wmhzu9d7z/vistas.png',
|
||||
url=host + 'top-peliculas-online/1.html'))
|
||||
|
||||
itemlist.append(itemlist[-1].clone(title="Buscar", action="search", thumbnail=get_thumb('search', auto=True),
|
||||
fanart='https://s30.postimg.cc/pei7txpa9/buscar.png', url=host + 'search/'))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
duplicado = []
|
||||
max_items = 24
|
||||
next_page_url = ''
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
data = scrapertools.decodeHtmlentities(data)
|
||||
patron = '"box_image_b.*?"><a href="([^"]+)" title=".*?><img src="([^"]+)" alt="(.*?)(\d{4}).*?"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if item.next_page != 'b':
|
||||
if len(matches) > max_items:
|
||||
next_page_url = item.url
|
||||
matches = matches[:max_items]
|
||||
next_page = 'b'
|
||||
else:
|
||||
matches = matches[max_items:]
|
||||
next_page = 'a'
|
||||
patron_next_page = '<a class="page dark gradient" href="([^"]+)">PROXIMO'
|
||||
matches_next_page = re.compile(patron_next_page, re.DOTALL).findall(data)
|
||||
if len(matches_next_page) > 0:
|
||||
next_page_url = urlparse.urljoin(item.url, matches_next_page[0])
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches:
|
||||
|
||||
url = scrapedurl
|
||||
thumbnail = scrapedthumbnail
|
||||
contentTitle = re.sub(r"\(.*?\)|\/.*?|\(|\)|.*?\/|!", "", scrapedtitle)
|
||||
title = scrapertools.decodeHtmlentities(contentTitle) + '(' + scrapedyear + ')'
|
||||
fanart = ''
|
||||
plot = ''
|
||||
|
||||
if url not in duplicado:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action='findvideos', title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||
fanart=fanart, contentTitle=contentTitle, infoLabels={'year': scrapedyear}))
|
||||
duplicado.append(url)
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
if next_page_url != '':
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=next_page_url,
|
||||
thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png', extra=item.extra,
|
||||
next_page=next_page))
|
||||
return itemlist
|
||||
|
||||
|
||||
def generos(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<li><a href="([^"]+)"><i class="fa fa-caret-right"><\/i> <strong>Películas de (.*?)<\/strong><\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
url = scrapedurl
|
||||
if scrapedtitle in tgenero:
|
||||
thumbnail = tgenero[scrapedtitle]
|
||||
else:
|
||||
thumbnail = ''
|
||||
title = scrapedtitle
|
||||
fanart = ''
|
||||
plot = ''
|
||||
|
||||
if title != 'Series':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action='lista', title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||
fanart=fanart))
|
||||
return itemlist
|
||||
|
||||
|
||||
def getinfo(page_url):
|
||||
logger.info()
|
||||
data = httptools.downloadpage(page_url).data
|
||||
plot = scrapertools.find_single_match(data, '<\/em>\.(?:\s*|.)(.*?)\s*<\/p>')
|
||||
info = plot
|
||||
|
||||
return info
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
info = getinfo(item.url)
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patron = 'src="(.*?)" style="border:none;'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
itemlist.extend(servertools.find_video_items(data=scrapedurl))
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.contentTitle
|
||||
videoitem.channel = item.channel
|
||||
videoitem.plot = info
|
||||
videoitem.action = "play"
|
||||
videoitem.folder = False
|
||||
videoitem.infoLabels=item.infoLabels
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
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", extra="findvideos", contentTitle=item.contentTitle))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "-")
|
||||
item.url = item.url + texto
|
||||
if texto != '':
|
||||
return lista(item)
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
# categoria='peliculas'
|
||||
try:
|
||||
if categoria in ['peliculas','latino']:
|
||||
item.url = host + 'page/1.html'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'peliculas-de-genero/infantil/1.html'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "crunchyroll",
|
||||
"name": "Crunchyroll",
|
||||
"language": ["cast", "lat"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"thumbnail": "http://i.imgur.com/O49fDS1.png",
|
||||
"categories": [
|
||||
|
||||
@@ -113,9 +113,10 @@ def series(item):
|
||||
scrapedtitle = ">> Pagina Siguiente"
|
||||
scrapedthumbnail = ""
|
||||
scrapedplot = ""
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="series", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot, folder=True, viewmode="movie_with_plot"))
|
||||
if len(itemlist)>0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="series", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot, folder=True, viewmode="movie_with_plot"))
|
||||
except:
|
||||
pass
|
||||
return itemlist
|
||||
|
||||
@@ -41,7 +41,7 @@ tcalidad = {"FULL HD": "https://s18.postimg.cc/qszt3n6tl/fullhd.png",
|
||||
"HD": "https://s27.postimg.cc/m2dhhkrur/image.png",
|
||||
"SD": "https://s29.postimg.cc/l66t2pfqf/image.png"
|
||||
}
|
||||
host = 'http://miradetodo.io/'
|
||||
host = 'http://miradetodo.net/'
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"id": "seriesmeme",
|
||||
"name": "SeriesMeme",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast", "lat"],
|
||||
"thumbnail": "seriesmeme.png",
|
||||
"banner": "seriesmeme.png",
|
||||
"categories": [
|
||||
"tvshow"
|
||||
]
|
||||
}
|
||||
@@ -1,224 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from channels import renumbertools
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'latino': 'Latino', 'español':'Español'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload',
|
||||
'sendvid',
|
||||
'netutv',
|
||||
'rapidvideo'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
host = "https://seriesmeme.com/"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
thumb_series_az = get_thumb("channels_tvshow_az.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="lista_gen", title="Novedades", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title="Listado Completo de Series", url=urlparse.urljoin(host, "/lista"),
|
||||
thumbnail=thumb_series))
|
||||
itemlist.append(Item(channel=item.channel, action="categorias", title="Categorias", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist.append(Item(channel=item.channel, action="alfabetico", title="Listado Alfabetico", url=host,
|
||||
thumbnail=thumb_series_az))
|
||||
itemlist.append(Item(channel=item.channel, action="top", title="Top Series", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
"""
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ","+")
|
||||
item.url = item.url+texto
|
||||
if texto!='':
|
||||
return lista(item)
|
||||
"""
|
||||
|
||||
|
||||
def categorias(item):
|
||||
logger.info()
|
||||
dict_gender = {"acción": "accion", "animes": "animacion", "aventuras": "aventura", "dibujos": "animacion",
|
||||
"ciencia ficción": "ciencia%20ficcion", "intriga": "misterio", "suspenso": "suspense",
|
||||
"thriller": "suspense", "fantástico": "fantasia"}
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron_cat = '<li id="menu-item-15068" class=".+?"><.+?>.+?<\/a>(.+?)<\/ul><\/li>'
|
||||
categorias = scrapertools.find_single_match(data, patron_cat)
|
||||
patron = '<li id="menu-item-.+?" class=".+?"><a href="([^"]+)">([^"]+)<\/a><\/li>'
|
||||
matches = scrapertools.find_multiple_matches(categorias, patron)
|
||||
for link, name in matches:
|
||||
if 'Género' in name:
|
||||
title = name.replace('Género ', '')
|
||||
url = link
|
||||
thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/azul/%s.png"
|
||||
thumbnail = thumbnail % dict_gender.get(title.lower(), title.lower())
|
||||
itemlist.append(item.clone(title=title, url=url, plot=title, action="lista_gen", thumbnail=thumbnail))
|
||||
return itemlist
|
||||
|
||||
|
||||
def alfabetico(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron_alf1 = '<li id="menu-item-15069" class=".+?"><.+?>.+?<\/a>(.+?)<\/ul><\/li>'
|
||||
patron_alf2 = '<li id="menu-item-15099" class=".+?"><.+?>.+?<\/a>(.+?)<\/ul><\/li>'
|
||||
alfabeto1 = scrapertools.find_single_match(data, patron_alf1)
|
||||
alfabeto2 = scrapertools.find_single_match(data, patron_alf2)
|
||||
alfabeto = alfabeto1 + alfabeto2
|
||||
patron = '<li id="menu-item-.+?" class=".+?"><a href="([^"]+)">([^"]+)<\/a><\/li>'
|
||||
matches = scrapertools.find_multiple_matches(alfabeto, patron)
|
||||
for link, name in matches:
|
||||
title = name
|
||||
url = link
|
||||
itemlist.append(item.clone(title=title, url=url, plot=title, action="lista_gen"))
|
||||
return itemlist
|
||||
|
||||
|
||||
def top(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron_top = '<li id="menu-item-15087" class=".+?"><.+?>.+?<\/a>(.+?)<\/ul><\/li>'
|
||||
top = scrapertools.find_single_match(data, patron_top)
|
||||
patron = '<a href="([^"]+)">([^"]+)<\/a>'
|
||||
matches = scrapertools.find_multiple_matches(top, patron)
|
||||
for link, name in matches:
|
||||
title = name
|
||||
url = link
|
||||
itemlist.append(item.clone(title=title, url=url, plot=title, action="lista_gen", show=title))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista_gen(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data1 = httptools.downloadpage(item.url).data
|
||||
data1 = re.sub(r"\n|\r|\t|\s{2}| ", "", data1)
|
||||
patron_sec = '<section class="content">.+?<\/section>'
|
||||
data = scrapertools.find_single_match(data1, patron_sec)
|
||||
patron = '<article id=.+? class=.+?><div.+?>'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)' # scrapedurl, # scrapedtitle
|
||||
patron += ' Capítulos Completos ([^"]+)">' # scrapedlang
|
||||
patron += '<img src=".+?" data-lazy-src="([^"]+)"' # scrapedthumbnail
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
i = 0
|
||||
for scrapedurl, scrapedtitle, scrapedlang, scrapedthumbnail in matches:
|
||||
i = i + 1
|
||||
if 'HD' in scrapedlang:
|
||||
scrapedlang = scrapedlang.replace('HD', '')
|
||||
title = scrapedtitle + " [ " + scrapedlang + "]"
|
||||
context1=[renumbertools.context(item), autoplay.context]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios",
|
||||
show=scrapedtitle, context=context1, language=scrapedlang))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
# Paginacion
|
||||
|
||||
#patron_pag='<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron_pag='<li class="next right"><a href="([^"]+)" >([^"]+)<\/a><\/li>'
|
||||
next_page_url = scrapertools.find_single_match(data,patron_pag)
|
||||
|
||||
if next_page_url!="" and i!=1:
|
||||
item.url=next_page_url[0]
|
||||
itemlist.append(Item(channel = item.channel,action = "lista_gen",title = ">> Página siguiente", url = next_page_url[0], thumbnail='https://s32.postimg.cc/4zppxf5j9/siguiente.png'))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<li><strong><a href="([^"]+)">([^"]+)<\/a>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for link, name in matches:
|
||||
title = name
|
||||
url = link
|
||||
itemlist.append(item.clone(title=title, url=url, plot=title, action="episodios"))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron_caps = '<li><strong><a href="([^"]+)">(.+?)–(.+?)<\/a>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron_caps)
|
||||
show = scrapertools.find_single_match(data, '<h3><strong>.+?de (.+?)<\/strong>')
|
||||
scrapedplot = scrapertools.find_single_match(data, '<strong>Sinopsis<\/strong><strong>([^"]+)<\/strong><\/pre>')
|
||||
for link, cap, name in matches:
|
||||
if 'x' in cap:
|
||||
title = cap + " - " + name
|
||||
else:
|
||||
season = 1
|
||||
episode = int(cap)
|
||||
season, episode = renumbertools.numbered_for_tratk(
|
||||
item.channel, item.show, season, episode)
|
||||
date = name
|
||||
title = "{0}x{1:02d} {2} ({3})".format(
|
||||
season, episode, "Episodio " + str(episode), date)
|
||||
# title = cap+" - "+name
|
||||
url = link
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=item.thumbnail,
|
||||
plot=scrapedplot, show=show))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
|
||||
action="add_serie_to_library", extra="episodios", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
itemlist.extend(servertools.find_video_items(data=data))
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel=item.channel
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://documentary.es/(\\d+[a-z0-9\\-]+)",
|
||||
"url": "http://documentary.es/\\1?embed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "documentary",
|
||||
"name": "documentary",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
try:
|
||||
# var videoVars = {"videoNonceVar":"94767795ce","post_id":"2835"};
|
||||
videoNonceVar = scrapertools.get_match(data,
|
||||
'var\s*videoVars\s*\=\s*\{"videoNonceVar"\:"([^"]+)","post_id"\:"\d+"')
|
||||
post_id = scrapertools.get_match(data, 'var\s*videoVars\s*\=\s*\{"videoNonceVar"\:"[^"]+","post_id"\:"(\d+)"')
|
||||
|
||||
# http://documentary.es/wp-admin/admin-ajax.php?postId=2835&videoNonce=94767795ce&action=getVideo&_=1385893877929
|
||||
import random
|
||||
url = "http://documentary.es/wp-admin/admin-ajax.php?postId=" + post_id + "&videoNonce=" + videoNonceVar + "&action=getVideo&_=" + str(
|
||||
random.randint(10000000000, 9999999999999))
|
||||
data = scrapertools.cache_page(url)
|
||||
|
||||
# {"videoUrl":"http:\/\/www.dailymotion.com\/embed\/video\/xioggh?autoplay=1&defaultSubtitle=es"}
|
||||
data = data.replace("\\", "")
|
||||
except:
|
||||
pass
|
||||
|
||||
from core import servertools
|
||||
real_urls = servertools.find_video_items(data=data)
|
||||
if len(real_urls) > 0:
|
||||
item = real_urls[len(real_urls) - 1]
|
||||
servermodule = __import__('servers.%s' % item.server, None, None, ["servers.%s" % item.server])
|
||||
# exec "import " + item.server
|
||||
# exec "servermodule = " + item.server
|
||||
video_urls = servermodule.get_video_url(item.url)
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(fileflyer.com/view/[a-zA-Z0-9]+)",
|
||||
"url": "http://www.\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fileflyer",
|
||||
"name": "fileflyer",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Vídeo borrado: http://www.fileflyer.com/view/fioZRBu
|
||||
# Video erróneo:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
if '<a href="/RemoveDetail.aspx">' in data:
|
||||
return False, "El archivo ya no está disponible<br/>en fileflyer (ha sido borrado)"
|
||||
else:
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
location = scrapertools.get_match(data,
|
||||
'<td class="dwnlbtn"[^<]+<a id="[^"]+" title="[^"]+" class="[^"]+" href="([^"]+)"')
|
||||
|
||||
video_urls.append([scrapertools.get_filename_from_url(location)[-4:] + " [fileflyer]", location])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "filez.tv/(?:embed/u=)?([A-z0-9]+)",
|
||||
"url": "http://filez.tv/embed/u=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filez",
|
||||
"name": "filez",
|
||||
"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": "http://i.imgur.com/HasfjUH.png"
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
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, follow_redirects=False)
|
||||
|
||||
if data.headers.get("location"):
|
||||
return False, "[filez] El archivo ha sido eliminado o no existe"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
video_urls = []
|
||||
media_urls = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)",\s*type\s*:\s*"([^"]+)"')
|
||||
for media_url, ext in media_urls:
|
||||
video_urls.append([".%s [filez]" % ext, media_url])
|
||||
|
||||
if not video_urls:
|
||||
media_urls = scrapertools.find_multiple_matches(data, '<embed.*?src="([^"]+)"')
|
||||
for media_url in media_urls:
|
||||
media_url = media_url.replace("https:", "http:")
|
||||
ext = httptools.downloadpage(media_url, only_headers=True).headers.get("content-disposition", "")
|
||||
ext = scrapertools.find_single_match(ext, 'filename="([^"]+)"')
|
||||
if ext:
|
||||
ext = ext[-4:]
|
||||
video_urls.append(["%s [filez]" % ext, media_url])
|
||||
|
||||
return video_urls
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "movshare.net/(?:embed|video)/([a-z0-9]+)",
|
||||
"url": "http://www.movshare.net/video/\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "movshare.net/embed.php\\?v\\=([a-z0-9]+)",
|
||||
"url": "http://www.movshare.net/video/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "movshare",
|
||||
"name": "movshare",
|
||||
"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": "server_movshare.png"
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
if "This file no longer exists on our servers" in data:
|
||||
return False, "El fichero ha sido borrado de movshare"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
videoid = scrapertools.get_match(page_url, "http://www.movshare.net/video/([a-z0-9]+)")
|
||||
video_urls = []
|
||||
|
||||
# Descarga la página
|
||||
headers = []
|
||||
headers.append(
|
||||
['User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'])
|
||||
html = scrapertools.cache_page(page_url, headers=headers)
|
||||
|
||||
# La vuelve a descargar, como si hubieras hecho click en el botón
|
||||
# html = scrapertools.cache_page(page_url , headers = headers)
|
||||
filekey = scrapertools.find_single_match(html, 'flashvars.filekey="([^"]+)"')
|
||||
|
||||
# get stream url from api
|
||||
api = 'http://www.movshare.net/api/player.api.php?key=%s&file=%s' % (filekey, videoid)
|
||||
headers.append(['Referer', page_url])
|
||||
|
||||
html = scrapertools.cache_page(api, headers=headers)
|
||||
logger.info("html=" + html)
|
||||
stream_url = scrapertools.find_single_match(html, 'url=(.+?)&title')
|
||||
|
||||
if stream_url != "":
|
||||
video_urls.append([scrapertools.get_filename_from_url(stream_url)[-4:] + " [movshare]", stream_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user