diff --git a/plugin.video.alfa/channels/animeflv_me.py b/plugin.video.alfa/channels/animeflv_me.py index 71b18b3b..b73b174f 100755 --- a/plugin.video.alfa/channels/animeflv_me.py +++ b/plugin.video.alfa/channels/animeflv_me.py @@ -21,12 +21,12 @@ CHANNEL_DEFAULT_HEADERS = [ REGEX_NEXT_PAGE = r"class='current'>\d+?
  • )(.+?)(?:)' -REGEX_THUMB = r'src="(http://media.animeflv\.me/uploads/thumbs/[^"]+?)"' +REGEX_THUMB = r'src="(http://media.animeflv\.co/uploads/thumbs/[^"]+?)"' REGEX_PLOT = r'Línea de historia:

    (.*?)' -REGEX_URL = r'href="(http://animeflv\.me/Anime/[^"]+)">' +REGEX_URL = r'href="(http://animeflv\.co/Anime/[^"]+)">' REGEX_SERIE = r'%s.+?%s([^<]+?)

    (.+?)

    ' % (REGEX_THUMB, REGEX_URL) -REGEX_EPISODE = r'href="(http://animeflv\.me/Ver/[^"]+?)">(?:)?(.+?)(\d+/\d+/\d+)' -REGEX_GENERO = r'([^<]+)' +REGEX_EPISODE = r'href="(http://animeflv\.co/Ver/[^"]+?)">(?:)?(.+?)(\d+/\d+/\d+)' +REGEX_GENERO = r'([^<]+)' def get_url_contents(url): @@ -309,7 +309,7 @@ def findvideos(item): itemlist = [] page_html = get_url_contents(item.url) - regex_api = r'http://player\.animeflv\.me/[^\"]+' + regex_api = r'http://player\.animeflv\.co/[^\"]+' iframe_url = scrapertools.find_single_match(page_html, regex_api) iframe_html = get_url_contents(iframe_url) diff --git a/plugin.video.alfa/channels/gmobi.py b/plugin.video.alfa/channels/gmobi.py index b768f4af..ebe6145e 100644 --- a/plugin.video.alfa/channels/gmobi.py +++ b/plugin.video.alfa/channels/gmobi.py @@ -3,24 +3,21 @@ # Alfa # ------------------------------------------------------------ -import urlparse,urllib2,urllib,re -import os, sys +import re from core import httptools -from core import tmdb -from core import jsontools as json from core import scrapertools from core import servertools +from core import tmdb from core.item import Item -from platformcode import config, logger - +from platformcode import logger def mainlist(item): logger.info() - itemlist = [] + itemlist = list() itemlist.append(item.clone(title="Novedades", action="peliculas", url="http://gnula.mobi/")) itemlist.append(item.clone(title="Castellano", action="peliculas", - url="http://www.gnula.mobi/tag/esp)anol/")) + url="http://www.gnula.mobi/tag/espanol/")) itemlist.append(item.clone(title="Latino", action="peliculas", url="http://gnula.mobi/tag/latino/")) itemlist.append(item.clone(title="VOSE", action="peliculas", url="http://gnula.mobi/tag/subtitulada/")) @@ -53,43 +50,66 @@ def sub_search(item): patron = '
    .*?.*?') if paginacion: - itemlist.append(channel=item.channel, action="sub_search", title="Next page >>" , url=paginacion) + itemlist.append(Item(channel=item.channel, action="sub_search", title="Next page >>", url=paginacion)) return itemlist + def peliculas(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t| |
    ", "", data) - patron = '
    .*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"' - matches = re.compile(patron,re.DOTALL).findall(data) - + patron = '
    .*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"' + matches = scrapertools.find_multiple_matches(data, patron) for scrapedurl, scrapedyear, scrapedtitle, scrapedthumbnail in matches: - - url = scrapedurl - title = scrapedtitle year = scrapertools.find_single_match(scrapedyear, r'.*?\((\d{4})\)') - thumbnail = scrapedthumbnail - new_item =Item (channel = item.channel, action="findvideos", title=title, contentTitle=title, url=url, - thumbnail=thumbnail, infoLabels = {'year':year}) - if year: - tmdb.set_infoLabels_item(new_item) + itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, fulltitle = scrapedtitle, url=scrapedurl, + thumbnail=scrapedthumbnail, infoLabels={'year': year})) - itemlist.append(new_item) - - next_page_url = scrapertools.find_single_match(data,'') - if next_page_url!="": - next_page_url = urlparse.urljoin(item.url,next_page_url) + tmdb.set_infoLabels(itemlist, True) + next_page_url = scrapertools.find_single_match(data, '> Añadir a la videoteca..." - try: - itemlist.extend(file_cine_library(item, url_targets)) - except: - pass + if config.get_videolibrary_support(): + itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green", + action="add_pelicula_to_library", url=url_targets, thumbnail = item.thumbnail, + fulltitle = item.contentTitle + )) return itemlist -def trailer(item): - import youtube - itemlist = [] - item.url = "https://www.googleapis.com/youtube/v3/search" + \ - "?q=" + item.show.replace(" ", "+") + "+trailer+HD+Español" \ - "®ionCode=ES" + \ - "&part=snippet" + \ - "&hl=es_ES" + \ - "&key=AIzaSyAd-YEOqZz9nXVzGtn3KWzYLbLaajhqIDA" + \ - "&type=video" + \ - "&maxResults=50" + \ - "&pageToken=" - itemlist.extend(youtube.fichas(item)) - # itemlist.pop(-1) - return itemlist - - -def file_cine_library(item, url_targets): - import os - from core import filetools - videolibrarypath = os.path.join(config.get_videolibrary_path(), "CINE") - archivo = item.show.strip() - strmfile = archivo + ".strm" - strmfilepath = filetools.join(videolibrarypath, strmfile) - - if not os.path.exists(strmfilepath): - itemlist = [] - itemlist.append(Item(channel=item.channel, title=">> Añadir a la videoteca...", url=url_targets, - action="add_file_cine_library", extra="episodios", show=archivo)) - - return itemlist - - -def add_file_cine_library(item): - from core import videolibrarytools - new_item = item.clone(title=item.show, action="play_from_library") - videolibrarytools.save_movie(new_item) - itemlist = [] - itemlist.append(Item(title='El vídeo ' + item.show + ' se ha añadido a la videoteca')) - # xbmctools.renderItems(itemlist, "", "", "") - platformtools.render_items(itemlist, "") - - return - def play(item): if "###" in item.url: @@ -780,13 +726,11 @@ def play(item): if devuelve: item.url = devuelve[0][1] item.server = devuelve[0][2] - + item.thumbnail = item.contentThumbnail + item.fulltitle = item.contentTitle return [item] -## -------------------------------------------------------------------------------- -## -------------------------------------------------------------------------------- - def agrupa_datos(data): ## Agrupa los datos data = re.sub(r'\n|\r|\t| |
    |', '', data) diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index bcaa5abd..ebd7c362 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -1,11 +1,11 @@ # -*- 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 logger, config @@ -16,117 +16,54 @@ def mainlist(item): itemlist = [] itemlist.append(Item(channel=item.channel, action="peliculas", title="Recientes", url=host)) - itemlist.append(Item(channel=item.channel, action="PorFecha", title="Año de Lanzamiento", url=host)) - itemlist.append(Item(channel=item.channel, action="Idiomas", title="Idiomas", url=host)) - itemlist.append(Item(channel=item.channel, action="calidades", title="Por calidad", url=host)) - itemlist.append(Item(channel=item.channel, action="generos", title="Por género", url=host)) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Año de Lanzamiento", + category = "lanzamiento" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Idiomas", + category = "idioma" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Por calidad", + category = "calidades" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Por género", + category = "generos" + )) itemlist.append(Item(channel=item.channel, action="search", title="Buscar...", url=host)) return itemlist -def PorFecha(item): - logger.info() - - # Descarga la pagina - data = httptools.downloadpage(item.url).data - data = scrapertools.find_single_match(data, '
    (.*?)
    ') - - # Extrae las entradas (carpetas) - patron = '
    (.*?)') - - # Extrae las entradas (carpetas) - patron = '(.*?)') - - # Extrae las entradas (carpetas) - patron = '(.*?)') - patron = '(.*?)
    ') patron = '([^.*?href=(.*?) >.*?href=(.*?) > (.*?)

    ' - matches = re.compile(patron, re.DOTALL).findall(data) + matches = scrapertools.find_multiple_matches(data, patron) for url, thumbnail, title, sinopsis in matches: itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url, @@ -157,7 +151,7 @@ def findvideos(item): # Descarga la pagina data = httptools.downloadpage(item.url).data patron = 'cursor: hand" rel="(.*?)".*?class="optxt">(.*?)<.*?width.*?class="q">(.*?)') + unpack = jsunpack.unpack(data) + logger.info("Intel11 %s" %unpack) + video_urls = [] + videourl = scrapertools.find_single_match(unpack, 'config={file:"([^"]+)') + video_urls.append([".MP4 [Cloudsany]", videourl]) + + return video_urls diff --git a/plugin.video.alfa/servers/cloudy.json b/plugin.video.alfa/servers/cloudy.json index a0d0f523..cd539545 100755 --- a/plugin.video.alfa/servers/cloudy.json +++ b/plugin.video.alfa/servers/cloudy.json @@ -48,5 +48,6 @@ "visible": false } ], + "thumbnail": "https://s1.postimg.org/9e6doboo2n/cloudy1.png", "version": 1 } diff --git a/plugin.video.alfa/servers/gamovideo.py b/plugin.video.alfa/servers/gamovideo.py index 5e378be7..2f746fbe 100755 --- a/plugin.video.alfa/servers/gamovideo.py +++ b/plugin.video.alfa/servers/gamovideo.py @@ -7,12 +7,12 @@ from core import scrapertools from lib import jsunpack from platformcode import logger -headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0'} +headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'} def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url, headers=headers).data + data = httptools.downloadpage(page_url, add_referer = True).data if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data: return False, "[Gamovideo] El archivo no existe o ha sido borrado" @@ -24,7 +24,7 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url, headers=headers).data + data = httptools.downloadpage(page_url, add_referer = True).data packer = scrapertools.find_single_match(data, "") diff --git a/plugin.video.alfa/servers/rapidgator.json b/plugin.video.alfa/servers/rapidgator.json index 880c7df2..5b2e5a89 100755 --- a/plugin.video.alfa/servers/rapidgator.json +++ b/plugin.video.alfa/servers/rapidgator.json @@ -10,7 +10,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "(rapidgator.net/file/.*?(?:\\.html))", + "pattern": "(rapidgator.net/file/\\w+(?:\\.html|))", "url": "http://\\1" } ] @@ -50,4 +50,4 @@ ], "thumbnail": "server_rapidgator.png", "version": 1 -} \ No newline at end of file +} diff --git a/plugin.video.alfa/servers/streamplay.json b/plugin.video.alfa/servers/streamplay.json index 2867247d..f04ab61a 100755 --- a/plugin.video.alfa/servers/streamplay.json +++ b/plugin.video.alfa/servers/streamplay.json @@ -68,5 +68,6 @@ "visible": false } ], + "thumbnail": "https://s1.postimg.org/912d5vxmv3/streamplay1.png", "version": 1 -} \ No newline at end of file +} diff --git a/plugin.video.alfa/servers/yourupload.json b/plugin.video.alfa/servers/yourupload.json index 401b7947..7e660487 100755 --- a/plugin.video.alfa/servers/yourupload.json +++ b/plugin.video.alfa/servers/yourupload.json @@ -58,5 +58,6 @@ "visible": false } ], + "thumbnail" : "https://s1.postimg.org/4wje61el4f/yourupload1.png", "version": 1 -} \ No newline at end of file +}