- (.+?)<\/ul><\/div>')
- patron = "(.+?)<\/a>"
- matches = scrapertools.find_multiple_matches(data_lista, patron)
- for link, name in matches:
- title = name + " [Latino]"
- url = link
- context1=[autoplay.context]
- itemlist.append(
- item.clone(title=title, url=url, plot=title, action="episodios", show=title,
- context=context1))
- tmdb.set_infoLabels(itemlist)
- return itemlist
-
-
-def episodios(item):
- logger.info()
-
- itemlist = []
- data = httptools.downloadpage(item.url).data
- data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
- data_lista = scrapertools.find_single_match(data,
- '
- [^<]+ " - matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl in matches: - data = agrupa_datos(httptools.downloadpage(scrapedurl).data) - sid = scrapertools.find_single_match(data, " 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 search_results(item) - else: - return [] - -def search_results(item): - logger.info() - - itemlist=[] - - data=get_source(item.url) - patron = '
(.+?)<\/ins>") - if data_id == "": - data_id = scrapertools.find_single_match(data, "
.*?
([^<]+)
' - matches = re.compile(patron, re.DOTALL).findall(data) - - for scrapedurl, scrapedthumb, scrapedtitle, type, year, lang_data, scrapedplot in matches: - - title = scrapedtitle - url = scrapedurl - thumbnail = scrapedthumb - plot = scrapedplot - language = get_language(lang_data) - type = re.sub('shows|s', '', type) - if language: - action = 'findvideos' - else: - action = 'seasons' - - new_item=Item(channel=item.channel, title=title, url=url, thumbnail=thumbnail, plot=plot, - action=action, type=type, language=language, infoLabels={'year':year}) - if new_item.action == 'findvideos': - new_item.contentTitle = new_item.title - else: - new_item.contentSerieName = new_item.title - - itemlist.append(new_item) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - return itemlist - -def newest(categoria): - logger.info() - itemlist = [] - item = Item() - try: - if categoria in ['peliculas']: - item.url = host + 'ver/' - elif categoria == 'infantiles': - item.url = host + 'genero/animacion/' - elif categoria == 'terror': - item.url = host + 'genero/terror/' - elif categoria == 'documentales': - item.url = host + 'genero/terror/' - item.type='movie' - itemlist = list_all(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 diff --git a/plugin.video.alfa/channels/pelis123.json b/plugin.video.alfa/channels/pelis123.json deleted file mode 100644 index 10596de6..00000000 --- a/plugin.video.alfa/channels/pelis123.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "pelis123", - "name": "Pelis123", - "active": true, - "adult": false, - "language": ["esp", "lat", "cast"], - "thumbnail": "pelis123.png", - "banner": "", - "categories": [ - "movie", - "tvshow", - "vos" - ], - "settings": [ - { - "id": "filter_languages", - "type": "list", - "label": "Mostrar enlaces en idioma...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": [ - "No filtrar", - "LAT", - "ESP", - "VOSE" - ] - }, - { - "id": "modo_grafico", - "type": "bool", - "label": "Buscar información extra", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "comprueba_enlaces", - "type": "bool", - "label": "Verificar si los enlaces existen", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "comprueba_enlaces_num", - "type": "list", - "label": "Número de enlaces a verificar", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "5", "10", "15", "20" ] - } ] -} - diff --git a/plugin.video.alfa/channels/pelis123.py b/plugin.video.alfa/channels/pelis123.py deleted file mode 100644 index 9a1cb75b..00000000 --- a/plugin.video.alfa/channels/pelis123.py +++ /dev/null @@ -1,359 +0,0 @@ -# -*- coding: utf-8 -*- - -import re, urllib - -from channels import autoplay -from platformcode import config, logger, platformtools -from core.item import Item -from core import httptools, scrapertools, jsontools, tmdb -from core import servertools -from channels import filtertools - - -host = 'https://pelis123.tv/' - - -IDIOMAS = {'LAT': 'LAT', 'ESP':'ESP', 'VOSE': 'VOSE'} -list_language = IDIOMAS.values() -list_servers = ['openload', 'fembed', 'directo'] -list_quality = [] - -__channel__='pelis123' -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) -try: - __modo_grafico__ = config.get_setting('modo_grafico', __channel__) -except: - __modo_grafico__ = True - - -def mainlist(item): - logger.info() - itemlist = [] - autoplay.init(item.channel, list_servers, list_quality) - - itemlist.append(item.clone( title = 'Películas', action = 'mainlist_pelis' )) - itemlist.append(item.clone( title = 'Series', action = 'mainlist_series' )) - - itemlist.append(item.clone( title = 'Buscar ...', action = 'search', search_type = 'all' )) - itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False)) - autoplay.show_option(item.channel, itemlist) - - return itemlist - - -def mainlist_pelis(item): - logger.info() - itemlist = [] - - itemlist.append(item.clone( title = 'Nuevas películas', action = 'list_all', url = host + 'film.html', search_type = 'movie' )) - itemlist.append(item.clone( title = 'Destacadas', action = 'list_all', url = host + 'featured.html', search_type = 'movie' )) - # ~ itemlist.append(item.clone( title = 'Estrenos de cine', action = 'list_all', url = host + 'cinema.html', search_type = 'movie' )) - - itemlist.append(item.clone( title = 'Por género', action = 'generos', search_type = 'movie' )) - itemlist.append(item.clone( title = 'Por idioma', action = 'idiomas', search_type = 'movie' )) - itemlist.append(item.clone( title = 'Por país', action = 'paises', search_type = 'movie' )) - itemlist.append(item.clone( title = 'Por año', action = 'anios', search_type = 'movie' )) - - itemlist.append(item.clone( title = 'Buscar película ...', action = 'search', search_type = 'movie' )) - - return itemlist - - -def mainlist_series(item): - logger.info() - itemlist = [] - - itemlist.append(item.clone( title = 'Nuevas series', action = 'list_all', url = host + 'series.html', search_type = 'tvshow' )) - - itemlist.append(item.clone( title = 'Por género', action = 'generos', search_type = 'tvshow' )) - - itemlist.append(item.clone( title = 'Buscar serie ...', action = 'search', search_type = 'tvshow' )) - - return itemlist - - -def anios(item): - logger.info() - return extraer_opciones(item, 'year') - -def generos(item): - logger.info() - return extraer_opciones(item, 'genre') - -def idiomas(item): - logger.info() - return extraer_opciones(item, 'lang') - -def paises(item): - logger.info() - return extraer_opciones(item, 'country') - -def extraer_opciones(item, select_id): - itemlist = [] - - url = host + 'search.html' - data = httptools.downloadpage(url).data - # ~ logger.debug(data) - url += '?type=' + ('series' if item.search_type == 'tvshow' else 'movies') - url += '&order=last_update&order_by=desc' - - bloque = scrapertools.find_single_match(data, '' % select_id) - - matches = re.compile('