diff --git a/plugin.video.alfa/channels/peliculasdk.py b/plugin.video.alfa/channels/peliculasdk.py
index e9ae3d45..24b596da 100644
--- a/plugin.video.alfa/channels/peliculasdk.py
+++ b/plugin.video.alfa/channels/peliculasdk.py
@@ -2,6 +2,7 @@
import re
+from core import httptools
from core import scrapertools
from core import servertools
from core.item import Item
@@ -10,74 +11,29 @@ from platformcode import logger
from platformcode import config
from core import tmdb
-try:
- import xbmc
- import xbmcgui
-except:
- pass
-import unicodedata
-
-ACTION_SHOW_FULLSCREEN = 36
-ACTION_GESTURE_SWIPE_LEFT = 511
-ACTION_SELECT_ITEM = 7
-ACTION_PREVIOUS_MENU = 10
-ACTION_MOVE_LEFT = 1
-ACTION_MOVE_RIGHT = 2
-ACTION_MOVE_DOWN = 4
-ACTION_MOVE_UP = 3
-OPTION_PANEL = 6
-OPTIONS_OK = 5
-
-host = "http://www.peliculasdk.com/"
-
-
-def bbcode_kodi2html(text):
- if config.get_platform().startswith("plex") or config.get_platform().startswith("mediaserver"):
- import re
- text = re.sub(r'\[COLOR\s([^\]]+)\]',
- r'',
- text)
- text = text.replace('[/COLOR]', '')
- text = text.replace('[CR]', '
')
- text = text.replace('[B]', '')
- text = text.replace('[/B]', '')
- text = text.replace('"color: yellow"', '"color: gold"')
- text = text.replace('"color: white"', '"color: auto"')
-
- return text
-
+host = "http://www.peliculasdk.com"
def mainlist(item):
logger.info()
itemlist = []
- title = "Estrenos"
- title = title.replace(title, bbcode_kodi2html("[COLOR orange]" + title + "[/COLOR]"))
itemlist.append(
- Item(channel=item.channel, title=title, action="peliculas", url="http://www.peliculasdk.com/ver/estrenos",
+ Item(channel=item.channel, title="[COLOR orange]Estrenos[/COLOR]", action="peliculas", url= host + "/ver/estrenos",
fanart="http://s24.postimg.org/z6ulldcph/pdkesfan.jpg",
thumbnail="http://s16.postimg.org/st4x601d1/pdkesth.jpg"))
- title = "PelisHd"
- title = title.replace(title, bbcode_kodi2html("[COLOR orange]" + title + "[/COLOR]"))
itemlist.append(
- Item(channel=item.channel, title=title, action="peliculas", url="http://www.peliculasdk.com/calidad/HD-720/",
+ Item(channel=item.channel, title="[COLOR orange]PelisHd[/COLOR]", action="peliculas", url= host + "/calidad/HD-720/",
fanart="http://s18.postimg.org/wzqonq3w9/pdkhdfan.jpg",
thumbnail="http://s8.postimg.org/nn5669ln9/pdkhdthu.jpg"))
- title = "Pelis HD-Rip"
- title = title.replace(title, bbcode_kodi2html("[COLOR orange]" + title + "[/COLOR]"))
itemlist.append(
- Item(channel=item.channel, title=title, action="peliculas", url="http://www.peliculasdk.com/calidad/HD-320",
+ Item(channel=item.channel, title="[COLOR orange]Pelis HD-Rip[/COLOR]", action="peliculas", url= host + "/calidad/HD-320",
fanart="http://s7.postimg.org/3pmnrnu7f/pdkripfan.jpg",
thumbnail="http://s12.postimg.org/r7re8fie5/pdkhdripthub.jpg"))
- title = "Pelis Audio español"
- title = title.replace(title, bbcode_kodi2html("[COLOR orange]" + title + "[/COLOR]"))
itemlist.append(
- Item(channel=item.channel, title=title, action="peliculas", url="http://www.peliculasdk.com/idioma/Espanol/",
+ Item(channel=item.channel, title="[COLOR orange]Pelis Audio español[/COLOR]", action="peliculas", url= host + "/idioma/Espanol/",
fanart="http://s11.postimg.org/65t7bxlzn/pdkespfan.jpg",
thumbnail="http://s13.postimg.org/sh1034ign/pdkhsphtub.jpg"))
- title = "Buscar..."
- title = title.replace(title, bbcode_kodi2html("[COLOR orange]" + title + "[/COLOR]"))
itemlist.append(
- Item(channel=item.channel, title=title, action="search", url="http://www.peliculasdk.com/calidad/HD-720/",
+ Item(channel=item.channel, title="[COLOR orange]Buscar...[/COLOR]", action="search", url= host + "/calidad/HD-720/",
fanart="http://s14.postimg.org/ceqajaw2p/pdkbusfan.jpg",
thumbnail="http://s13.postimg.org/o85gsftyv/pdkbusthub.jpg"))
@@ -88,7 +44,7 @@ def search(item, texto):
logger.info()
texto = texto.replace(" ", "+")
- item.url = "http://www.peliculasdk.com/index.php?s=%s&x=0&y=0" % (texto)
+ item.url = host + "/index.php?s=%s&x=0&y=0" % (texto)
try:
return buscador(item)
@@ -103,11 +59,8 @@ def search(item, texto):
def buscador(item):
logger.info()
itemlist = []
-
- # Descarga la página
- data = scrapertools.cache_page(item.url)
+ data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
-
patron = '