From 9a28c1a5ddeefebc3fc4fa2f14d168f1b7f55f06 Mon Sep 17 00:00:00 2001
From: Alfa-beto <30815244+Alfa-beto@users.noreply.github.com>
Date: Wed, 23 Jan 2019 11:00:47 -0300
Subject: [PATCH] Correcciones
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Correcciones:
- DoramasMP4: Cambio de dominio
- PelisPlus: Corrección para temporadas
- SeriesPapaya: Corrección en reproducción
- Vi2: Corrección por cambio de estructura
---
plugin.video.alfa/channels/doramasmp4.py | 4 ++--
plugin.video.alfa/channels/pelisplus.py | 2 +-
plugin.video.alfa/channels/seriespapaya.py | 6 +++--
plugin.video.alfa/channels/vi2.py | 28 ++++++++++++----------
4 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/plugin.video.alfa/channels/doramasmp4.py b/plugin.video.alfa/channels/doramasmp4.py
index e1a26fc1..7ac71475 100644
--- a/plugin.video.alfa/channels/doramasmp4.py
+++ b/plugin.video.alfa/channels/doramasmp4.py
@@ -16,7 +16,7 @@ from core.item import Item
from platformcode import config, logger
from channelselector import get_thumb
-host = 'https://www2.doramasmp4.com/'
+host = 'https://www3.doramasmp4.com/'
IDIOMAS = {'sub': 'VOSE', 'VO': 'VO'}
list_language = IDIOMAS.values()
@@ -191,7 +191,7 @@ def findvideos(item):
video_data = httptools.downloadpage(video_url, headers=headers).data
url = scrapertools.find_single_match(video_data, "'file':'([^']+)'")
else:
- video_url = 'https://www2.doramasmp4.com/api/redirect.php?token=%s' % token
+ video_url = 'https://www3.doramasmp4.com/api/redirect.php?token=%s' % token
video_data = httptools.downloadpage(video_url, headers=headers, follow_redirects=False).headers
url = scrapertools.find_single_match(video_data['location'], '\d+@@@(.*?)@@@')
diff --git a/plugin.video.alfa/channels/pelisplus.py b/plugin.video.alfa/channels/pelisplus.py
index 852132fa..abe285f3 100644
--- a/plugin.video.alfa/channels/pelisplus.py
+++ b/plugin.video.alfa/channels/pelisplus.py
@@ -148,7 +148,7 @@ def seasons(item):
itemlist=[]
data=get_source(item.url)
- patron='data-toggle="tab">TEMPORADA.?(\d+)'
+ patron='data-toggle="tab">TEMPORADA\s?(\d+)'
matches = re.compile(patron, re.DOTALL).findall(data)
infoLabels = item.infoLabels
diff --git a/plugin.video.alfa/channels/seriespapaya.py b/plugin.video.alfa/channels/seriespapaya.py
index 10a1b196..4f82b0da 100644
--- a/plugin.video.alfa/channels/seriespapaya.py
+++ b/plugin.video.alfa/channels/seriespapaya.py
@@ -216,9 +216,11 @@ def play(item):
logger.info("play: %s" % item.url)
itemlist = []
data = httptools.downloadpage(item.url).data
- item.url = scrapertools.find_single_match(data, "location.href='([^']+)")
- item.server = ""
+ new_url = scrapertools.find_single_match(data, "location.href='([^']+)")
+ if new_url != '':
+ item.url = new_url
itemlist.append(item.clone())
itemlist = servertools.get_servers_itemlist(itemlist)
itemlist[0].thumbnail=item.contentThumbnail
return itemlist
+
diff --git a/plugin.video.alfa/channels/vi2.py b/plugin.video.alfa/channels/vi2.py
index 2d0d1dda..c19ae543 100644
--- a/plugin.video.alfa/channels/vi2.py
+++ b/plugin.video.alfa/channels/vi2.py
@@ -86,8 +86,7 @@ def sub_menu(item):
logger.info()
itemlist = []
- url = host + '/%s/es/' % item.type
- search_url = host + '/search/'
+ url = host + '/%s/es/ajax/1/' % item.type
link_type = item.title.lower()
if link_type == 'streaming':
link_type = 'flash'
@@ -119,8 +118,8 @@ def sub_menu(item):
url=url + '?q=%s+subtitulado' % link_type, action='list_all',
thumbnail=get_thumb('vose', auto=True), type=item.type, send_lang='VOSE',
link_type=link_type))
- itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=search_url + '?q=',
- thumbnail=get_thumb("search", auto=True), type='search', link_type=link_type))
+ itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=url + '?q=',
+ thumbnail=get_thumb("search", auto=True), type=item.type, link_type=link_type))
return itemlist
@@ -145,7 +144,7 @@ def section(item):
for scrapedurl, scrapedtitle in matches:
title = scrapedtitle
- url = host+scrapedurl
+ url = host+scrapedurl.replace('/?','/ajax/1/?')
if (item.title=='Generos' and title.lower() not in excluded and not title.isdigit()) or (item.title=='Por Año' and title.isdigit()):
itemlist.append(Item(channel=item.channel, url=url, title=title, action='list_all', type=item.type))
@@ -159,8 +158,11 @@ def list_all(item):
listed =[]
quality=''
infoLabels = {}
- data= get_source(item.url, referer='%s/%s/es/' %(host, item.type))
+ json_data= jsontools.load(get_source(item.url))
+ data = json_data['render']
+ data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data)
+ #if item.type == 'peliculas':
patron = ''
patron += '