Reportar aquí cualquier problema con Openload
Re: Reportar aquí cualquier problema con Openload
Mensaje por bic » 22 Abr 2017, 16:05
No a mi en estos momentos tampoco me funciona ahora falta saber si sera un fallo puntual y funcionara mas tarde o si habran hecho cambios otra vez
 ..........La verdad es que estoy un poco sorprendido de que los ultimos arreglos recientes duren tanto y no haya que repararlo a diario............En fin ojala siga durando tanto sin dar la lata openload con sus cambios
 ..........La verdad es que estoy un poco sorprendido de que los ultimos arreglos recientes duren tanto y no haya que repararlo a diario............En fin ojala siga durando tanto sin dar la lata openload con sus cambios 
Publicidad
Re: Reportar aquí cualquier problema con Openload
Mensaje por Cmos » 22 Abr 2017, 22:35

Re: Reportar aquí cualquier problema con Openload
Mensaje por Masay90 » 23 Abr 2017, 20:28
 | S.O: Win7
  | S.O: Win7Plataforma: Kodi 17.4 skin confluence | Pelisalacarta: alfa la ultima
 | S.O: Androdid 5.1.1
   | S.O: Androdid 5.1.1Re: Reportar aquí cualquier problema con Openload
Mensaje por qqplayer » 02 May 2017, 16:25
Seria posible si no es mucho pedir que lo "adaptaras" al plugin url resolver para poder usar openload en otros addons?
Este el codigo de openload.py en urlresolver:
Código: Seleccionar todo
# -*- coding: utf-8 -*-
"""
openload.io urlresolver plugin
Copyright (C) 2015 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import json
import ol_gmu
from urlresolver import common
from urlresolver.common import i18n
from urlresolver.resolver import UrlResolver, ResolverError
API_BASE_URL = 'https://api.openload.co/1'
INFO_URL = API_BASE_URL + '/streaming/info'
GET_URL = API_BASE_URL + '/streaming/get?file={media_id}'
FILE_URL = API_BASE_URL + '/file/info?file={media_id}'
OL_PATH = os.path.join(common.plugins_path, 'ol_gmu.py')
class OpenLoadResolver(UrlResolver):
    name = "openload"
    domains = ["openload.io", "openload.co", "oload.tv"]
    pattern = '(?://|\.)(o(?:pen)??load\.(?:io|co|tv))/(?:embed|f)/([0-9a-zA-Z-_]+)'
    def __init__(self):
        self.net = common.Net()
    def get_media_url(self, host, media_id):
        try:
            self._auto_update(self.get_setting('url'), OL_PATH, self.get_setting('key'))
            reload(ol_gmu)
            return ol_gmu.get_media_url(self.get_url(host, media_id))  # @UndefinedVariable
        except Exception as e:
            common.log_utils.log_debug('Exception during openload resolve parse: %s' % (e))
            try:
                if not self.__file_exists(media_id):
                    raise ResolverError('File Not Available')
                
                video_url = self.__check_auth(media_id)
                if not video_url:
                    video_url = self.__auth_ip(media_id)
            except ResolverError:
                raise
            
            if video_url:
                return video_url
            else:
                raise ResolverError(i18n('no_ol_auth'))
    def get_url(self, host, media_id):
        return 'http://openload.co/embed/%s' % (media_id)
    def __file_exists(self, media_id):
        js_data = self.__get_json(FILE_URL.format(media_id=media_id))
        return js_data.get('result', {}).get(media_id, {}).get('status') == 200
        
    def __auth_ip(self, media_id):
        js_data = self.__get_json(INFO_URL)
        pair_url = js_data.get('result', {}).get('auth_url', '')
        if pair_url:
            pair_url = pair_url.replace('\/', '/')
            header = i18n('ol_auth_header')
            line1 = i18n('auth_required')
            line2 = i18n('visit_link')
            line3 = i18n('click_pair') % (pair_url)
            with common.kodi.CountdownDialog(header, line1, line2, line3) as cd:
                return cd.start(self.__check_auth, [media_id])
        
    def __check_auth(self, media_id):
        try:
            js_data = self.__get_json(GET_URL.format(media_id=media_id))
        except ResolverError as e:
            status, msg = e
            if status == 403:
                return
            else:
                raise ResolverError(msg)
        
        return js_data.get('result', {}).get('url')
    
    def __get_json(self, url):
        result = self.net.http_GET(url).content
        common.log_utils.log(result)
        js_result = json.loads(result)
        if js_result['status'] != 200:
            raise ResolverError(js_result['status'], js_result['msg'])
        return js_result
    @classmethod
    def get_settings_xml(cls):
        xml = super(cls, cls).get_settings_xml()
        xml.append('<setting id="%s_auto_update" type="bool" label="%s" default="true"/>' % (cls.__name__, i18n('auto_update')))
        xml.append('<setting id="%s_url" type="text" label="    %s" default="" visible="eq(-1,true)"/>' % (cls.__name__, i18n('update_url')))
        xml.append('<setting id="%s_key" type="text" label="    %s" default="" option="hidden" visible="eq(-2,true)"/>' % (cls.__name__, i18n('decrypt_key')))
        xml.append('<setting id="%s_etag" type="text" default="" visible="false"/>' % (cls.__name__))
        return xml
Un saludo.
Re: Reportar aquí cualquier problema con Openload
Mensaje por Cmos » 04 May 2017, 18:39
Buenas qqplayer, la verdad es que no es complicado adaptarlo para urlresolver, el problema sería más que nada mantenerlo actualizado, porque lógicamente tarde o temprano openload cambiará, e igualmente el plugin urlresolver también puede tener cambios internos. De todas formas, te dejo aquí el código, pero no me puedo comprometer a actualizarlo cada vez que cambie...
Código: Seleccionar todo
# -*- coding: utf-8 -*-
"""
openload.io urlresolver plugin
Copyright (C) 2015 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import re
import os
import json
import ol_gmu
from urlresolver import common
from urlresolver.common import i18n
from urlresolver.resolver import UrlResolver, ResolverError
API_BASE_URL = 'https://api.openload.co/1'
INFO_URL = API_BASE_URL + '/streaming/info'
GET_URL = API_BASE_URL + '/streaming/get?file={media_id}'
FILE_URL = API_BASE_URL + '/file/info?file={media_id}'
OL_PATH = os.path.join(common.plugins_path, 'ol_gmu.py')
default_headers = dict()
default_headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
default_headers["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
default_headers["Accept-Language"] = "es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3"
default_headers["Accept-Charset"] = "UTF-8"
default_headers["Accept-Encoding"] = "gzip"
class OpenLoadResolver(UrlResolver):
    name = "openload"
    domains = ["openload.io", "openload.co", "oload.tv"]
    pattern = '(?://|\.)(o(?:pen)??load\.(?:io|co|tv))/(?:embed|f)/([0-9a-zA-Z-_]+)'
    def __init__(self):
        self.net = common.Net()
    def get_media_url(self, host, media_id):
        try:
            url = self.get_url(host, media_id)
            import urllib2, gzip
            from StringIO import StringIO
            handlers = [urllib2.HTTPHandler(debuglevel=False)]
            opener = urllib2.build_opener(*handlers)
            req = urllib2.Request(url, '', default_headers)
            data = opener.open(req).read()
            data = gzip.GzipFile(fileobj=StringIO(data)).read()
            text_encode = re.findall('(゚ω゚.*?\(\'\_\'\));', data, re.DOTALL)
            text_decode = ""
            for t in text_encode:
                text_decode += self.decode(t)
            var_r = re.findall("window\.[A-z]+\s*=\s*['\"]([^'\"]+)['\"]", text_decode, re.DOTALL)[0]
            var_encodes = re.findall('id="%s[^"]*">([^<]+)<' % var_r, data, re.DOTALL)
            numeros = re.findall('_[A-Fa-f0-9]+x[A-Fa-f0-9]+\s*=\s*([0-9]{4,}|0x[A-Fa-f0-9]{4,});', data, re.DOTALL)
            op1, op2 = re.findall('\(0x(\d),0x(\d)\);', data, re.DOTALL)[0]
            videourl = ""
            for encode in var_encodes:
                text_decode = ""
                try:
                    mult = int(op1) * int(op2)
                    rango1 = encode[:mult]
                    decode1 = []
                    for i in range(0, len(rango1), 8):
                        decode1.append(int(rango1[i:i+8], 16))
                    rango1 = encode[mult:]
                    j = 0
                    i = 0
                    while i < len(rango1):
                        index1 = 64
                        value1 = 0
                        value2 = 0
                        value3 = 0
                        while True:
                            if (i + 1) >= len(rango1):
                                index1 = 143
                            value3 = int(rango1[i:i+2], 16)
                            i += 2
                            data = value3 & 63
                            value2 += data << value1
                            value1 += 6
                            if value3 < index1:
                                break
                        value4 = value2 ^ decode1[j % (mult/8)]
                        for n in numeros:
                            if not n.isdigit():
                                n = int(n, 16)
                            value4 ^= int(n)
                        value5 = index1 * 2 + 127 
                        for h in range(4):
                            valorfinal = (value4 >> 8 * h) & (value5)
                            valorfinal = chr(valorfinal)
                            if valorfinal != "%":
                                text_decode += valorfinal
                        j += 1
                except:
                    continue
                videourl = "https://openload.co/stream/%s?mime=true" % text_decode
            if videourl:
                return videourl
            else:
                raise ResolverError('Error al descodificar')
        except Exception as e:
            common.log_utils.log_debug('Exception during openload resolve parse: %s' % (e))
            try:
                if not self.__file_exists(media_id):
                    raise ResolverError('File Not Available')
            except ResolverError:
                raise
    def get_url(self, host, media_id):
        return 'http://openload.co/embed/%s' % (media_id)
    def __file_exists(self, media_id):
        js_data = self.__get_json(FILE_URL.format(media_id=media_id))
        return js_data.get('result', {}).get(media_id, {}).get('status') == 200
    
    def __get_json(self, url):
        result = self.net.http_GET(url).content
        common.log_utils.log(result)
        js_result = json.loads(result)
        if js_result['status'] != 200:
            raise ResolverError(js_result['status'], js_result['msg'])
        return js_result
    @classmethod
    def get_settings_xml(cls):
        xml = super(cls, cls).get_settings_xml()
        xml.append('<setting id="%s_auto_update" type="bool" label="%s" default="true"/>' % (cls.__name__, i18n('auto_update')))
        xml.append('<setting id="%s_url" type="text" label="    %s" default="" visible="eq(-1,true)"/>' % (cls.__name__, i18n('update_url')))
        xml.append('<setting id="%s_key" type="text" label="    %s" default="" option="hidden" visible="eq(-2,true)"/>' % (cls.__name__, i18n('decrypt_key')))
        xml.append('<setting id="%s_etag" type="text" default="" visible="false"/>' % (cls.__name__))
        return xml
    def decode(self, text):
        text = re.sub(r"\s+|/\*.*?\*/", "", text)
        data = text.split("+(゚Д゚)[゚o゚]")[1]
        chars = data.split("+(゚Д゚)[゚ε゚]+")[1:]
        txt = ""
        for char in chars:
            char = char \
                .replace("(o゚ー゚o)","u") \
                .replace("c", "0") \
                .replace("(゚Д゚)['0']", "c") \
                .replace("゚Θ゚", "1") \
                .replace("!+[]", "1") \
                .replace("-~", "1+") \
                .replace("o", "3") \
                .replace("_", "3") \
                .replace("゚ー゚", "4") \
                .replace("(+", "(")
            char = re.sub(r'\((\d)\)', r'\1', char)
            c = ""; subchar = ""
            for v in char:
                c+= v
                try: x = c; subchar+= str(eval(x)); c = ""
                except: pass
            if subchar != '': txt+= subchar + "|"
        txt = txt[:-1].replace('+','')
        txt_result = "".join([ chr(int(n, 8)) for n in txt.split('|') ])
        return self.toStringCases(txt_result)
    def toStringCases(self, txt_result):
        sum_base = ""
        m3 = False
        if ".toString(" in txt_result:
            if "+(" in  txt_result:
                m3 = True
                sum_base = "+"+re.findall(".toString...(\d+).", txt_result, re.DOTALL)[0]
                txt_pre_temp = re.findall("..(\d),(\d+).", txt_result, re.DOTALL)
                txt_temp = [ (n, b) for b ,n in txt_pre_temp ]
            else:
                txt_temp = re.findall('(\d+)\.0.\w+.([^\)]+).', txt_result, re.DOTALL)
            for numero, base in txt_temp:
                code = self.toString( int(numero), eval(base+sum_base) )
                if m3:
                    txt_result = re.sub( r'"|\+', '', txt_result.replace("("+base+","+numero+")", code) )
                else:
                    txt_result = re.sub( r"'|\+", '', txt_result.replace(numero+".0.toString("+base+")", code) )
        return txt_result
    def toString(self, number,base):
        string = "0123456789abcdefghijklmnopqrstuvwxyz"
        if number < base:
            return string[number]
        else:
            return toString(number//base,base) + string[number%base]
Re: Reportar aquí cualquier problema con Openload
Mensaje por qqplayer » 07 May 2017, 14:19
Que pena que no se pueda hacer un corta-pega con el de pelisalacarta.
Muchos addons usan el urlresolver y con lo poco que tarda openload en cambiar supongo que en unos dias me quedo sin el , habra que aprovechar.
Un saludo.
Volver a “Problemas (no me funciona...)”
- Ayuda sobre plugins
- ↳ tvalacarta
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ pelisalacarta
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ pelisalacarta (For Italian users)
- ↳ Problemi (Non mi funziona...)
- ↳ Domande (Come fare a...)
- ↳ Suggerimenti (Sarebbe bello che...)
- ↳ mywebtv
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ MediaExplorer
- ↳ Balandro
- ↳ Otros plugins
- ↳ Alfa
- ↳ Alfa (For Italian users)
- ↳ Tutoriales
- Ayuda sobre mediacenters
- ↳ XBMC / Kodi
- ↳ Plex
- ↳ Android
- ↳ Raspberry Pi
- ↳ Boxee
- ↳ WiiMC
- ↳ Enigma 2
- ↳ Otros media center
- Sugerencias
- ↳ Nuevos canales
- ↳ Mejoras
- Desarrolladores
- Comunidad
¿Qué es Mi media center?
Este es el foro oficial de soporte para pelisalacarta, tvalacarta y mywebtv.
                También es un lugar para compartir tus experiencias con dispositivos multimedia y software media center, puede que encuentres algo interesante que ni siquiera sabías que se podía hacer.
Primeros pasos en Kodi

Si estás empezando con Kodi, o si estás interesado en sacarle más partido, puedes echar un vistazo a esta colección de video-tutoriales.
Aprenderás a crear y optimizar tu biblioteca, a instalar add-ons, a buscar subtítulos...
Cómo reportar un problema
Si tienes un problema en alguno de los plugins y quieres reportarlo, no olvides incluir el log.
Para que resulte útil tienes que activar la opción de "log completo" en el plugin, luego reiniciar Kodi y dar los pasos necesarios hasta que se produzca el problema.

Luego copia tu fichero de log, siguiendo las instrucciones que se describen en este enlace, e inclúyelo al final de la descripción de tu problema.
Aprende a programar para Kodi
Si sabes programar, esta serie de tutoriales que describen paso a paso cómo desarrollar tu propio add-on para Kodi.
Y si quieres añadir tus propios canales a pelisalacarta también te contamos paso a paso cómo hacerlo en este enlace.
¿Quién está conectado?
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado

