Example #1
0
def urlmixdrop(url):
    url_attr = urlparse.urlparse(url)
    id = url_attr[2].replace('.html', '').replace(
        '/f/', '').replace('/e/', '').replace('/', '')
    url = '{}://{}/e/{}/'.format(url_attr[0], url_attr[1], id)
    valid, data = test_mixdrop(url)
    calidades = []
    sources = []
    finalurlmixdrop = ''

    if valid:
        jspacks = re.findall(
            "(eval.function.p,a,c,k,e,d.*?)\n", data, re.IGNORECASE)
        if len(jspacks) > 0:
            for jspack in jspacks:
                unpack = jsunpack.unpack(jspack)
                data = data.replace(jspack, unpack)

        items = re.findall('wurl\s*=\s*\"(.+?)\"', data, re.IGNORECASE)
        if len(items) > 0:
            for item in items:
                if item.startswith('//'):
                    finalurlmixdrop = url_attr[0] + ':' + item
                header_test = {
                    'user-agent': 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'}
                header_test['origin'] = url = '{}://{}'.format(
                    url_attr[0], url_attr[1])
                header_test['referer'] = url
                header_test = '|' + urllib.urlencode(header_test)

                return True, finalurlmixdrop + header_test

    return False, ''
Example #2
0
def urlgamovideo(url):

    url_attr = urlparse(url)

    id_gamovideo = re.findall('(\w{12})', url_attr[2], re.I)[0]

    url = 'http://{}/{}.html'.format(url_attr[1], id_gamovideo)

    s = requests.Session()

    s.headers.update({
        'User-Agent':
        'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
    })

    r = s.get(url)

    source = r.content

    if test_online(source):

        r = s.get(url)

        source = r.content

        if test_online(source):

            source = re.sub('(\r){1,}', '', source)

            source = re.sub('(\n){1,}', '', source)

            source = re.sub('(\t){1,}', '', source)

            source = re.sub('(\s){1,}', ' ', source)

            header_test = {
                'User-Agent':
                'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36'
            }

            jspacks = re.findall(
                "<script type=.text/javascript.>(eval.function.p,a,c,k,e,d..*?)</script>",
                source, re.IGNORECASE)

            if len(jspacks) > 0:

                for jspack in jspacks:

                    source = source.replace(jspack, jsunpack.unpack(jspack))

            finalurlgamo = re.findall('file:\s*\"(http.*?mp4)\"', source,
                                      re.IGNORECASE)[0]

            header_test = '|' + urllib.urlencode(header_test)

            return finalurlgamo + header_test

    exit()
Example #3
0
def urluqload(url):

    url_attr = urlparse.urlparse(url)

    id = url_attr[2].replace('.html', '').replace('embed-',
                                                  '').replace('/', '')

    url = '{}://{}/embed-{}.html'.format(url_attr[0], url_attr[1], id)

    valid, data = test_uqload(url)

    calidades = []

    sources = []

    if valid:

        jspacks = re.findall("(eval.function.p,a,c,k,e,d.*?)\n", data,
                             re.IGNORECASE)

        if len(jspacks) > 0:

            for jspack in jspacks:

                unpack = jsunpack.unpack(jspack)

                data = data.replace(jspack, unpack)

        header_test = {
            'user-agent':
            'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36',
            'referer': url
        }

        header_test = '|' + urllib.urlencode(header_test)

        items = re.findall('sources.*?\[(.*?)\]', data, re.IGNORECASE)

        if len(items) > 0:

            for item in items:

                item = (item.replace('"', '').replace("'", '').replace(
                    '{', '{"').replace('}', '"}').replace(',', '","').replace(
                        ':', '":"').replace(' ', '').replace(
                            '":"//', '://').replace('}","{', '},{'))

                finalurluqload = item

                return True, finalurluqload + header_test

    return False, ''
Example #4
0
def calidadesuqload(url):

    url_attr = urlparse.urlparse(url)

    id = url_attr[2].replace('.html', '').replace('embed-',
                                                  '').replace('/', '')

    url = '{}://{}/embed-{}.html'.format(url_attr[0], url_attr[1], id)

    valid, data = test_uqload(url)

    calidades = []

    sources = []

    if valid:

        jspacks = re.findall("(eval.function.p,a,c,k,e,d.*?)\n", data,
                             re.IGNORECASE)

        if len(jspacks) > 0:

            for jspack in jspacks:

                unpack = jsunpack.unpack(jspack)

                data = data.replace(jspack, unpack)

        items = re.findall('sources.*?\[(.*?)\]', data, re.IGNORECASE)

        if len(items) > 0:

            for item in items:

                item = (item.replace('"', '').replace("'", '').replace(
                    '{', '{"').replace('}', '"}').replace(',', '","').replace(
                        ':', '":"').replace(' ', '').replace(
                            '":"//', '://').replace('}","{', '},{'))

                sources += item

        if len(sources) > 0:

            return True

    return False
Example #5
0
def calidadesclipwatching(url):
    url_attr = urlparse.urlparse(url)
    id = url_attr[2]
    id = id.split('/')[1]
    id = id.replace('.html', '').replace(
        'embed-', '').replace('/', '')
    url = '{}://{}/embed-{}.html'.format(url_attr[0], url_attr[1], id)
    valid, data = test_clipwatching(url)
    calidades = []
    sources = []

    if valid:
        jspacks = re.findall(
            "(eval.function.p,a,c,k,e,d.*?)\n", data, re.IGNORECASE)
        if len(jspacks) > 0:
            for jspack in jspacks:
                unpack = jsunpack.unpack(jspack)
                data = data.replace(jspack, unpack)
        items = re.findall('sources.*?(\[.*?\])', data, re.IGNORECASE)
        if len(items) > 0:
            for item in items:
                item = json.loads(item.replace(
                    'src', '"src"').replace('type', '"type"'))
                sources += item
        if len(sources) > 0:
            for source in sources:
                cals = ['360p', '720p']
                i2 = 0
                if 'm3u8' in source['src']:
                    calidades += ['Variable']
                    others = source['src'].split(',')
                    i1 = 0
                    for other in others:
                        if not 'm3u8' in other and not 'http' in other:
                            if i1 == 0:
                                calidades += ['360p']
                            else:
                                calidades += ['720p']
                            i1 += 1
                else:
                    calidades += [cals[i2]]
                    i2 += 1

    return calidades
Example #6
0
def calidadesmixdrop(url):
    url_attr = urlparse.urlparse(url)
    id = url_attr[2].replace('.html', '').replace(
        '/f/', '').replace('/e/', '').replace('/', '')
    url = '{}://{}/e/{}/'.format(url_attr[0], url_attr[1], id)
    valid, data = test_mixdrop(url)
    calidades = []
    sources = []

    if valid:
        jspacks = re.findall(
            "(eval.function.p,a,c,k,e,d.*?)\n", data, re.IGNORECASE)
        if len(jspacks) > 0:
            for jspack in jspacks:
                unpack = jsunpack.unpack(jspack)
                data = data.replace(jspack, unpack)

        items = re.findall('wurl\s*=\s*\"(.+?)\"', data, re.IGNORECASE)
        if len(items) > 0:
            for item in items:
                return ['MIXdrop']

    return calidades
Example #7
0
def resolver(url, referer='', headers_tv=headers):
    if not p():
        dialog.notification(
            base64.b64decode('RnVzaW9uIFRFQU0='),
            base64.b64decode(
                'SW5zdGFsYSBGdXNpb25PcmcgcGFyYSB2ZXIgZXN0ZSBjb250ZW5pZG8='),
            xbmcgui.NOTIFICATION_INFO, 20000, True)
        exit()
    url = re.sub('(\r){1,}', '', url)
    url = re.sub('(\n){1,}', '', url)
    url = re.sub('(\t){1,}', '', url)
    url = re.sub('(\s){1,}', '', url)
    if type(referer) == list:
        referer = referer[0]
    if type(referer) == tuple:
        referer = referer[0]
    referer = re.sub('(\r){1,}', ' ', referer)
    referer = re.sub('(\r){1,}', ' ', referer)
    referer = re.sub('(\n){1,}', ' ', referer)
    referer = re.sub('(\t){1,}', ' ', referer)
    referer = re.sub('(\s){1,}', ' ', referer)
    if referer == '':
        if 'referer' in url:
            url = url.split('referer')
            referer = url[1].replace('=', '')
            url = url[0]
    if not 'referer' in url:
        url = url.replace('&', '')

    if referer == '':
        if 'football-live.stream' in url:
            headers_tv['Referer'] = 'https://football-live.stream'
        if 'wstream' in url:
            headers_tv['Referer'] = 'https://wstream.to/'
    else:
        headers_tv['Referer'] = referer

    try:
        data, cookies, location = get_url(url, h=headers_tv)
        if 'p,a,c,k,e,d' in data:
            packeds = re.findall('(eval\\(function\\(p,a,c,k,e,d.*)', data)
            for packed in packeds:
                unpacked = jsunpack.unpack(packed).replace('\\', '')
                data = data.replace(packed, unpacked)
        data = re.sub('(\r){1,}', ' ', data)
        data = re.sub('(\n){1,}', ' ', data)
        data = re.sub('(\t){1,}', ' ', data)
        data = re.sub('(\s){1,}', ' ', data)

        if 'football-live.stream' in url:
            headers_tv['Origin'] = 'https://football-live.stream'
            headers_tv['Referer'] = url
        if 'wstream' in url:
            headers_tv['Origin'] = 'https://wstream.to'
            headers_tv['Referer'] = url
        final_link = re.findall('source:\"(.*?)"', data, re.I)
        if len(final_link) == 0:
            final_link = re.findall("source:\s*\'(.*?)'", data, re.I)
        if len(final_link) > 0:
            headers_play = headers_tv
            headers_play = urllib.urlencode(headers_play)
            url = final_link[0]

            dialog = xbmcgui.Dialog()
            dialog.notification("FusionOrg", "Iniciando reproducción",
                                xbmcgui.NOTIFICATION_INFO, 5000, False)
            headers_play = headers_play.replace('Origin', 'origin').replace(
                'Referer', 'referer').replace('User-Agent', 'user-agent')
            play_item = xbmcgui.ListItem(path=url + '|' + headers_play)
            xbmc_version = xbmc.getInfoLabel("System.BuildVersion")
            version = float(xbmc_version[:4])
            if version <= 18.6:
                play_item.setProperty('inputstreamaddon',
                                      'inputstream.adaptive')
            else:
                play_item.setProperty('inputstream', 'inputstream.adaptive')
            play_item.setProperty("IsPlayable", "true")
            play_item.setProperty('inputstream.adaptive.manifest_type', 'hls')
            play_item.setMimeType('application/vnd.apple.mpegstream_url')
            play_item.setContentLookup(False)
            play_item.setProperty('inputstream.adaptive.stream_headers',
                                  headers_play)
            xbmcplugin.setResolvedUrl(addon_handle, True, listitem=play_item)
            return True
        if 'telerium.tv/embed/' in data:
            srcs = re.findall(
                'iframe.*?src\s*=\s*\"(.*?telerium.tv\/embed\/.*?)\".*?\/iframe',
                data, re.I)
            if len(srcs) > 0:
                import telerium
                telerium.resolver(srcs[0], referer=referer)
                return True
        if '://embed.telerium.tv/embed.js' in data:
            srcs = re.findall('script.*?id=\"(\d*)\"', data, re.I)
            if len(srcs) > 0:
                import telerium
                telerium.resolver('https://telerium.tv/embed/' + srcs[0] +
                                  '.html',
                                  referer=referer)
                return True
    except:
        pass
    dialog = xbmcgui.Dialog()
    dialog.notification('FusionOrg', 'Fallo en: ' + url,
                        xbmcgui.NOTIFICATION_INFO, 5000, True)
    xbmc.sleep(1000)
    exit()
Example #8
0
def urlclipwatching(url):
    calidad = ''
    if 'calidad' in url:
        calidad = urlparse.parse_qs(url)['calidad'][0]
        url = url.split('&')[0]

    url_attr = urlparse.urlparse(url)
    id = url_attr[2]
    id = id.split('/')[1]
    id = id.replace('.html', '').replace(
        'embed-', '').replace('/', '')
    url = '{}://{}/embed-{}.html'.format(url_attr[0], url_attr[1], id)
    valid, data = test_clipwatching(url)
    sources = []
    finalurlclipwatching = ''
    if valid:
        jspacks = re.findall(
            "(eval.function.p,a,c,k,e,d.*?)\n", data, re.IGNORECASE)
        if len(jspacks) > 0:
            for jspack in jspacks:
                unpack = jsunpack.unpack(jspack)
                data = data.replace(jspack, unpack)
        items = re.findall('sources.*?(\[.*?\])', data, re.IGNORECASE)
        if len(items) > 0:
            for item in items:
                item = json.loads(item.replace(
                    'src', '"src"').replace('type', '"type"'))
                sources += item
        i1 = len(sources)
        cals = ['360p', '720p']
        finalurlsclipwatching = {}
        finalurlsclipwatching['Variable'] = ''
        finalurlsclipwatching['360p'] = ''
        finalurlsclipwatching['720p'] = ''
        if len(sources) > 0:
            for source in sources:
                i2 = 0
                if 'm3u8' in source['src']:
                    finalurlsclipwatching['Variable'] = source['src']
                    others = source['src'].split(',')
                    i1 = 0
                    for other in others:
                        if not 'm3u8' in other and not 'http' in other:
                            if i1 == 0:
                                finalurlsclipwatching['360p'] = others[0] + ',' +\
                                    other + ',' + others[-1]
                            else:
                                finalurlsclipwatching['720p'] = others[0] + ',' + \
                                    other + ',' + others[-1]
                            i1 += 1
                else:
                    finalurlsclipwatching[cals[i2]] = source
                    i2 += 1
        if finalurlsclipwatching[calidad] == '':
            for link in finalurlsclipwatching:
                if link != '':
                    finalurlclipwatching = link
        else:
            finalurlclipwatching = finalurlsclipwatching[calidad]
        header_test = {
            'user-agent': 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'}
        header_test = '|' + urllib.urlencode(header_test)

        return True, finalurlclipwatching + header_test

    return False, ''
Example #9
0
def gounlimited(url):
    calidad = ''
    if 'calidad' in url:
        calidad = urlparse.parse_qs(url)['calidad'][0]
        url = url.split('&')[0]

    url_attr = urlparse.urlparse(url)
    id = url_attr[2].replace('.html', '').replace(
        'embed-', '').replace('/', '')
    url = '{}://{}/{}.html'.format(url_attr[0], url_attr[1], id)
    valid, data = test_gounlimited(url)
    calidades = []
    finallinks = []
    subtitles = []
    media_subtitles = []
    if valid:
        jspacks = re.findall(
            "(eval.function.p,a,c,k,e,d.*?)\n", data, re.IGNORECASE)
        if len(jspacks) > 0:
            for jspack in jspacks:
                unpack = jsunpack.unpack(jspack)
                data = data.replace(jspack, unpack)

        sources = re.findall(
            "player.src\((\[.*?\])\)", data, re.IGNORECASE)
        if len(sources) > 0:
            sources = sources[0].replace('src', '"src"').replace('type', '"type"').replace('res', '"res"').replace('label', '"label"')
            sources = json.loads(sources)

        subtitles = re.findall("externalTracks:(\[.*?\])", data, re.IGNORECASE)

        if len(subtitles) > 0:
            subtitles = subtitles[0].replace('src', '"src"').replace(
                'label', '"label"').replace('lang', '"lang"')
            subtitles = json.loads(subtitles)
        else:
            subtitles = []

        for subtitle in subtitles:
            media_subtitles.append(
                (subtitle['src'], subtitle['lang'], subtitle['label']))

        calidades = re.findall(
            "Resolution:.*?>\d*x(\d*)<.*?", data, re.IGNORECASE)
        if len(calidades) > 0:
            calidades = [calidades[0]]
        else:
            calidades = re.findall("Size:\s*<.*?>(.*?)<", data, re.IGNORECASE)
            if len(calidades) > 0:
                calidades = [calidades[0]]
            else:
                calidades = ['720']

        if calidad == '':
            return True, calidades, media_subtitles
        else:
            finallink = sources[0]['src']
            default_headers['Referer'] = '{}://{}/embed-{}.html'.format(
                url_attr[0], url_attr[1], id)
            default_headers['cookie'] = 'lang=1'
            return True, finallink + '|' + urllib.urlencode(default_headers)
    else:
        return False, 'Link Muerto :(', media_subtitles
    return False, 'Gounlimited fallo!!!', media_subtitles