From 3682c0bfdb04f4ecf089e57b78a0f9a6a2cb5d35 Mon Sep 17 00:00:00 2001 From: GeorgeRamga Date: Tue, 6 Mar 2018 01:58:51 -0600 Subject: [PATCH 01/21] Fix Capitulos Algunos capitulos no muestran opciones. --- plugin.video.alfa/channels/animemovil.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugin.video.alfa/channels/animemovil.py b/plugin.video.alfa/channels/animemovil.py index 632b14b4..8d84eb5e 100644 --- a/plugin.video.alfa/channels/animemovil.py +++ b/plugin.video.alfa/channels/animemovil.py @@ -299,11 +299,10 @@ def findvideos(item): stream_info = 'http:%s/%s/%s?expire=%s&callback=%s&signature=%s&last_modify=%s' % \ (access_point, id, server, expire, callback, signature, last_modify) - dict_stream = jsontools.load(httptools.downloadpage(stream_info).data) - - if dict_stream['status']: - kind = dict_stream['result']['kind'] - try: + try: + dict_stream = jsontools.load(httptools.downloadpage(stream_info).data) + if dict_stream['status']: + kind = dict_stream['result']['kind'] if kind == 'iframe': url = dict_stream['result']['src'] title = '%s (%s)' % (item.title, server) @@ -337,8 +336,8 @@ def findvideos(item): if url != '': itemlist.append(item.clone(title=title, url=url, action='play')) - except: - pass + except: + pass itemlist = servertools.get_servers_itemlist(itemlist) return itemlist From 2e4f6deb2e9c26df7e84a542ecc9534f69e9a5dc Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 6 Mar 2018 08:58:45 -0500 Subject: [PATCH 02/21] allcalidad: actualizado findvideos --- plugin.video.alfa/channels/allcalidad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index 97ac059a..93bf520f 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -134,7 +134,7 @@ def findvideos(item): url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "") if "youtube" in url: titulo = "[COLOR = yellow]Ver trailer: %s[/COLOR]" - if "ad.js" in url or "script" in url: + if "ad.js" in url or "script" in url or "jstags.js" in url: continue elif "vimeo" in url: url += "|" + "http://www.allcalidad.com" From b933c0da66635322d0d494c507e408f9b98ed7f2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 6 Mar 2018 16:46:55 -0300 Subject: [PATCH 03/21] Cambio de nombre para newpct1 + busqueda + 4k --- .../{newpct1.json => descargas2020.json} | 16 +- plugin.video.alfa/channels/descargas2020.py | 217 ++++++++++++++++++ plugin.video.alfa/channels/newpct1.py | 100 -------- 3 files changed, 229 insertions(+), 104 deletions(-) rename plugin.video.alfa/channels/{newpct1.json => descargas2020.json} (58%) create mode 100644 plugin.video.alfa/channels/descargas2020.py delete mode 100644 plugin.video.alfa/channels/newpct1.py diff --git a/plugin.video.alfa/channels/newpct1.json b/plugin.video.alfa/channels/descargas2020.json similarity index 58% rename from plugin.video.alfa/channels/newpct1.json rename to plugin.video.alfa/channels/descargas2020.json index 26b6d67f..d413b2e0 100755 --- a/plugin.video.alfa/channels/newpct1.json +++ b/plugin.video.alfa/channels/descargas2020.json @@ -1,11 +1,11 @@ { - "id": "newpct1", - "name": "Newpct1", + "id": "descargas2020", + "name": "Descargas2020", "active": true, "adult": false, "language": ["cast", "lat"], - "thumbnail": "newpct1.png", - "banner": "newpct1.png", + "thumbnail": "http://descargas2020.com/d20/library/content/template/images/_logod2020.png", + "banner": "", "categories": [ "movie", "tvshow", @@ -28,6 +28,14 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_newest_4k", + "type": "bool", + "label": "Incluir en Novedades - 4K", + "default": true, + "enabled": true, + "visible": true } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/descargas2020.py b/plugin.video.alfa/channels/descargas2020.py new file mode 100644 index 00000000..1fe2ca87 --- /dev/null +++ b/plugin.video.alfa/channels/descargas2020.py @@ -0,0 +1,217 @@ +# -*- coding: utf-8 -*- + +import re +import urllib +import urlparse + +from core import servertools +from core import scrapertools +from core.item import Item +from platformcode import logger +from core import httptools + +Host='http://descargas2020.com' + + +def mainlist(item): + logger.info() + + itemlist = [] + itemlist.append(Item(channel=item.channel, action="submenu", title="Películas",url=Host+"/peliculas/")) + itemlist.append(Item(channel=item.channel, action="submenu", title="Series",url=Host+"/series/")) + #itemlist.append(Item(channel=item.channel, action="listado", title="Anime", url=Host+"/anime/", + # viewmode="movie_with_plot")) + #itemlist.append( + # Item(channel=item.channel, action="listado", title="Documentales", url=Host+"/documentales/", + # viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, action="search", title="Buscar", url= Host+'/buscar')) + return itemlist + +def submenu(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + patron = '
  • (.+?)<\/ul>' #Filtrado por url + data_cat = scrapertools.find_single_match(data, patron) + patron_cat='
  • <\/li>' + matches = scrapertools.find_multiple_matches(data_cat, patron_cat) + for scrapedurl, scrapedtitle in matches: + itemlist.append(item.clone(title=scrapedtitle, url=scrapedurl,action="listado")) + if 'peliculas' in item.url: + new_item = item.clone(title='Peliculas 4K', url=Host+'/buscar', post='q=4k', action='listado2', + pattern='buscar-list') + itemlist.append(new_item) + return itemlist + + +def listado(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + patron_data='
      (.+?)
    ' + data_listado = scrapertools.find_single_match(data, patron_data) + patron_listado='
  • .*?>[/COLOR]": + itemlist.pop() + + # Se captura la excepción, para no interrumpir al canal novedades si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist \ No newline at end of file diff --git a/plugin.video.alfa/channels/newpct1.py b/plugin.video.alfa/channels/newpct1.py deleted file mode 100644 index b6bcc865..00000000 --- a/plugin.video.alfa/channels/newpct1.py +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import urllib -import urlparse - -from core import servertools -from core import scrapertools -from core.item import Item -from platformcode import logger -from core import httptools - -Host='http://descargas2020.com' - - -def mainlist(item): - logger.info() - - itemlist = [] - itemlist.append(Item(channel=item.channel, action="submenu", title="Películas",url=Host+"/peliculas/")) - itemlist.append(Item(channel=item.channel, action="submenu", title="Series",url=Host+"/series/")) - #itemlist.append(Item(channel=item.channel, action="listado", title="Anime", url=Host+"/anime/", - # viewmode="movie_with_plot")) - #itemlist.append( - # Item(channel=item.channel, action="listado", title="Documentales", url=Host+"/documentales/", - # viewmode="movie_with_plot")) - #itemlist.append(Item(channel=item.channel, action="search", title="Buscar")) - return itemlist - -def submenu(item): - logger.info() - itemlist = [] - - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - patron = '
  • (.+?)<\/ul>' #Filtrado por url - data_cat = scrapertools.find_single_match(data, patron) - patron_cat='
  • <\/li>' - matches = scrapertools.find_multiple_matches(data_cat, patron_cat) - for scrapedurl, scrapedtitle in matches: - itemlist.append(item.clone(title=scrapedtitle, url=scrapedurl,action="listado")) - return itemlist - - -def listado(item): - logger.info() - itemlist = [] - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - patron_data='
      (.+?)
    ' - data_listado = scrapertools.find_single_match(data, patron_data) - patron_listado='
  • Date: Tue, 6 Mar 2018 16:47:35 -0300 Subject: [PATCH 04/21] Corregida la busqueda + 4k --- plugin.video.alfa/channels/descargasmix.json | 24 ++++++++++++++++++++ plugin.video.alfa/channels/descargasmix.py | 13 +++++------ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/plugin.video.alfa/channels/descargasmix.json b/plugin.video.alfa/channels/descargasmix.json index 95890119..1955280c 100644 --- a/plugin.video.alfa/channels/descargasmix.json +++ b/plugin.video.alfa/channels/descargasmix.json @@ -51,6 +51,30 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_newest_series", + "type": "bool", + "label": "Incluir en Novedades - series", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_anime", + "type": "bool", + "label": "Incluir en Novedades - anime", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_4k", + "type": "bool", + "label": "Incluir en Novedades - 4K", + "default": true, + "enabled": true, + "visible": true } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/descargasmix.py b/plugin.video.alfa/channels/descargasmix.py index 41e5f030..131fd6ff 100644 --- a/plugin.video.alfa/channels/descargasmix.py +++ b/plugin.video.alfa/channels/descargasmix.py @@ -548,19 +548,18 @@ def newest(categoria): try: if categoria == 'torrent': item.url = host+'/peliculas' - itemlist = entradas(item) - if itemlist[-1].title == ">> Siguiente": - itemlist.pop() + if categoria == 'series': item.url = host + '/series' - itemlist.extend(entradas(item)) - if itemlist[-1].title == ">> Siguiente": - itemlist.pop() + if categoria == '4k': + item.url = host + '/peliculas/4k' + itemlist.extend(entradas(item)) + + if categoria == 'anime': item.url = host + '/anime' - itemlist.extend(entradas(item)) if itemlist[-1].title == ">> Siguiente": From a7283e498b128d1bb2dc489748782f2ccd62c750 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 6 Mar 2018 16:48:26 -0300 Subject: [PATCH 05/21] Cambio de nombre para divxatope + correccion de busqueda + 4k --- .../{divxatope.json => mispelisyseries.json} | 16 ++- .../{divxatope.py => mispelisyseries.py} | 135 +++++++++++++----- 2 files changed, 109 insertions(+), 42 deletions(-) rename plugin.video.alfa/channels/{divxatope.json => mispelisyseries.json} (69%) rename plugin.video.alfa/channels/{divxatope.py => mispelisyseries.py} (76%) diff --git a/plugin.video.alfa/channels/divxatope.json b/plugin.video.alfa/channels/mispelisyseries.json similarity index 69% rename from plugin.video.alfa/channels/divxatope.json rename to plugin.video.alfa/channels/mispelisyseries.json index 8f70eb4a..9d5ae057 100755 --- a/plugin.video.alfa/channels/divxatope.json +++ b/plugin.video.alfa/channels/mispelisyseries.json @@ -1,11 +1,11 @@ { - "id": "divxatope", - "name": "Divxatope", + "id": "mispelisyseries", + "name": "Mispelisyseries", "active": true, "adult": false, "language": ["cast", "lat"], - "thumbnail": "divxatope.png", - "banner": "divxatope.png", + "thumbnail": "http://mispelisyseries.com/mps/library/content/template_mps/images/logomps.png", + "banner": "", "categories": [ "torrent", "movie", @@ -43,6 +43,14 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_newest_4k", + "type": "bool", + "label": "Incluir en Novedades - 4K", + "default": true, + "enabled": true, + "visible": true } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/divxatope.py b/plugin.video.alfa/channels/mispelisyseries.py similarity index 76% rename from plugin.video.alfa/channels/divxatope.py rename to plugin.video.alfa/channels/mispelisyseries.py index d1aae940..b3eabc2d 100644 --- a/plugin.video.alfa/channels/divxatope.py +++ b/plugin.video.alfa/channels/mispelisyseries.py @@ -10,17 +10,17 @@ from core import servertools from core.item import Item from platformcode import logger - +host = 'http://mispelisyseries.com/' def mainlist(item): logger.info() itemlist = [] - itemlist.append(Item(channel=item.channel, action="menu", title="Películas", url="http://www.divxatope1.com/", + itemlist.append(Item(channel=item.channel, action="menu", title="Películas", url=host, extra="Peliculas", folder=True)) itemlist.append( - Item(channel=item.channel, action="menu", title="Series", url="http://www.divxatope1.com", extra="Series", + Item(channel=item.channel, action="menu", title="Series", url=host, extra="Series", folder=True)) - itemlist.append(Item(channel=item.channel, action="search", title="Buscar...")) + itemlist.append(Item(channel=item.channel, action="search", title="Buscar", url=host + 'buscar')) return itemlist @@ -44,61 +44,64 @@ def menu(item): plot = "" itemlist.append(Item(channel=item.channel, action="lista", title=title, url=url, thumbnail=thumbnail, plot=plot, folder=True)) + + if title != "Todas las Peliculas": itemlist.append( Item(channel=item.channel, action="alfabetico", title=title + " [A-Z]", url=url, thumbnail=thumbnail, plot=plot, folder=True)) - if item.extra == "Peliculas": - title = "4k UltraHD" - url = "http://divxatope1.com/peliculas-hd/4kultrahd/" - thumbnail = "" - plot = "" - itemlist.append(Item(channel=item.channel, action="lista", title=title, url=url, thumbnail=thumbnail, plot=plot, - folder=True)) + itemlist.append( Item(channel=item.channel, action="alfabetico", title=title + " [A-Z]", url=url, thumbnail=thumbnail, plot=plot, folder=True)) + if 'películas' in item.title.lower(): + new_item = item.clone(title='Peliculas 4K', url=host+'buscar', post='q=4k', action='listado2', + pattern='buscar-list') + itemlist.append(new_item) + return itemlist def search(item, texto): - logger.info() - texto = texto.replace(" ", "+") - item.url = "http://www.divxatope1.com/buscar/descargas" - item.extra = urllib.urlencode({'q': texto}) + logger.info("search:" + texto) + # texto = texto.replace(" ", "+") - try: - itemlist = lista(item) + #try: + item.post = "q=%s" % texto + item.pattern = "buscar-list" + itemlist = listado2(item) - # Esta pagina coloca a veces contenido duplicado, intentamos descartarlo - dict_aux = {} - for i in itemlist: - if not i.url in dict_aux: - dict_aux[i.url] = i - else: - itemlist.remove(i) - - return itemlist - # Se captura la excepci?n, para no interrumpir al buscador global si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] + return itemlist + # Se captura la excepción, para no interrumpir al buscador global si un canal falla + # except: + # import sys + # for line in sys.exc_info(): + # logger.error("%s" % line) + # return [] def newest(categoria): itemlist = [] item = Item() try: if categoria in ['peliculas', 'torrent']: - item.url = "http://www.divxatope1.com/peliculas" + item.url = host+"peliculas" elif categoria == 'series': - item.url = "http://www.divxatope1.com/series" + item.url = host+"series" + + if categoria == '4k': + + item.url = Host + '/buscar' + + item.post = 'q=4k' + + item.pattern = 'buscar-list' + + action = listado2(item) else: return [] @@ -180,7 +183,7 @@ def lista(item): matches = re.compile(patron, re.DOTALL).findall(calidad + '
    ') idioma = '' - if "divxatope1.com/serie" in url: + if host+"/serie" in url: contentTitle = re.sub('\s+-|\.{3}$', '', contentTitle) capitulo = '' temporada = 0 @@ -220,6 +223,62 @@ def lista(item): return itemlist +def listado2(item): + logger.info() + itemlist = [] + + data = re.sub(r"\n|\r|\t|\s{2,}", "", httptools.downloadpage(item.url, post=item.post).data) + data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8") + + list_chars = [["ñ", "ñ"]] + for el in list_chars: + data = re.sub(r"%s" % el[0], el[1], data) + try: + get, post = scrapertools.find_single_match(data, '