|\s{2,}', "", data) + data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data) return data def list_all(item): @@ -79,13 +80,13 @@ def list_all(item): data = get_source(item.url) contentSerieName = '' - patron = "
|\s{2,}', "", data) - patron = ".*?src=(.*?) style.*?value=(.*?)>" + data = get_source(item.url) + + patron = '
|\s{2,}', "", data) - return data - - -def list_all(item): - logger.info() - - itemlist = [] - data = get_source(item.url) - contentSerieName = '' - - patron = "
|\s{2,}', "", data) - patron = ".*?src=(.*?) style.*?value=(.*?)>" - - matches = re.compile(patron, re.DOTALL).findall(data) - - for scrapedurl, scrapedthumb, scrapedtitle in matches: - itemlist.append(Item(channel=item.channel, - title=scrapedtitle, - url=host+scrapedurl, - action="seasons", - thumbnail=scrapedthumb, - contentSerieName=scrapedtitle, - context=filtertools.context(item, list_language, list_quality) - )) - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - return itemlist - - -def search(item, texto): - logger.info() - import urllib - if texto != '': - post = {'query':texto} - post = urllib.urlencode(post) - item.post = post - - return search_results(item) diff --git a/plugin.video.alfa/channels/yaske.json b/plugin.video.alfa/channels/yaske.json deleted file mode 100644 index 8b9ad9d4..00000000 --- a/plugin.video.alfa/channels/yaske.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "id": "yaske", - "name": "Yaske", - "active": false, - "adult": false, - "language": ["cast", "lat"], - "banner": "yaske.png", - "fanart": "https://github.com/master-1970/resources/raw/master/images/fanart/yaske.png", - "thumbnail": "yaske.png", - "categories": [ - "direct", - "movie" - ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "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": false, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_terror", - "type": "bool", - "label": "Incluir en Novedades - terror", - "default": true, - "enabled": true, - "visible": true - } - ] -} diff --git a/plugin.video.alfa/channels/yaske.py b/plugin.video.alfa/channels/yaske.py deleted file mode 100644 index b81aa810..00000000 --- a/plugin.video.alfa/channels/yaske.py +++ /dev/null @@ -1,349 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import urllib -import unicodedata - -from core import channeltools -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 - -idiomas1 = {"/es.png":"CAST","/en_es.png":"VOSE","/la.png":"LAT","/en.png":"ENG"} -domain = "yaske.ro" -HOST = "http://www." + domain -HOST_MOVIES = "http://peliculas." + domain + "/now_playing/" -HOST_TVSHOWS = "http://series." + domain + "/popular/" -HOST_TVSHOWS_TPL = "http://series." + domain + "/tpl" -parameters = channeltools.get_channel_parameters('yaske') -fanart_host = parameters['fanart'] -thumbnail_host = parameters['thumbnail'] -color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] - - -def mainlist(item): - logger.info() - itemlist = [] - item.url = HOST - item.text_color = color2 - item.fanart = fanart_host - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" - - itemlist.append(item.clone(title="Peliculas", text_bold=True, viewcontent='movies', - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title=" Novedades", action="peliculas", viewcontent='movies', - url=HOST_MOVIES, - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title=" Estrenos", action="peliculas", - url=HOST + "/premiere", thumbnail=thumbnail % 'estrenos')) - itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", thumbnail=thumbnail % 'generos', viewmode="thumbnails", - url=HOST - )) - itemlist.append(item.clone(title=" Buscar película", action="search", thumbnail=thumbnail % 'buscar', - type = "movie" )) - - itemlist.append(item.clone(title="Series", text_bold=True, viewcontent='movies', - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title=" Novedades", action="series", viewcontent='movies', - url=HOST_TVSHOWS, - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title=" Buscar serie", action="search", thumbnail=thumbnail % 'buscar', - type = "tvshow" )) - - return itemlist - - -def series(item): - logger.info() - itemlist = [] - url_p = scrapertools.find_single_match(item.url, '(.*?).page=') - page = scrapertools.find_single_match(item.url, 'page=([0-9]+)') - if not page: - page = 1 - url_p = item.url - else: - page = int(page) + 1 - if "search" in item.url: - url_p += "&page=%s" %page - else: - url_p += "?page=%s" %page - data = httptools.downloadpage(url_p).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - patron = '(?s)class="post-item-image btn-play-item".*?' - patron += 'href="(http://series[^"]+)">.*?' - patron += '
(.*?)