Esempio n. 1
0
def get_game(url):
    try:
        koding.Show_Busy(status=True)
        link1 = url.split("**")[-3]
        name = url.split("**")[-2]
        thumbnail = url.split("**")[-1]
        t = scraper.get(link1).content
        m2 = re.compile(
            '<div class="video_and_autoplay">.+?data-mcvideourl="(.+?)"',
            re.DOTALL).findall(t)
        final_link = m2[0]
        koding.Show_Busy(status=False)
        info = xbmcgui.ListItem(name, thumbnailImage=thumbnail)
        xbmc.Player().play(final_link, info)
    except:
        pass
def get_game(url):
    xml = ""
    try:
        koding.Show_Busy(status=True)
        link1 = url.split("**")[-1]
        html2 = requests.get(link1).content
        match2 = re.compile('<div id="trailer-player">.+?src="(.+?)"',
                            re.DOTALL).findall(html2)
        link2 = "http:" + match2[0]
        html3 = requests.get(link2).content
        match3 = re.compile('"videoUrls":.+?,"(.+?)"',
                            re.DOTALL).findall(html3)
        link3 = match3[0]
        koding.Show_Busy(status=False)
        xbmc.Player().play(link3)
    except:
        pass
Esempio n. 3
0
def get_game(url):
    pins = ""
    xml = ""
    try:
        koding.Show_Busy(status=True)
        link1 = url.split("**")[-3]
        name = url.split("**")[-2]
        thumbnail = url.split("**")[-1]
        html2 = requests.get(link1).content
        match2 = re.compile('<body id="moviefone".+?src="(.+?)"',
                            re.DOTALL).findall(html2)
        link2 = match2[0]
        link3 = link2.replace("embed/", "manifest/").replace(".js", ".m3u8")
        link3 = link3 + "|Referer=https://www.moviephone.com/"
        koding.Show_Busy(status=False)
        info = xbmcgui.ListItem(name, thumbnailImage=thumbnail)
        xbmc.Player().play(link3, info)
    except:
        pass
Esempio n. 4
0
def get_link(url):
    koding.Show_Busy(status=True)
    url2 = url.split("**")[-3]
    name = url.split("**")[-2]
    image = url.split("**")[-1]
    html = requests.get(url2).content
    match = re.compile('eval\(function(.+?)</script>',re.DOTALL).findall(html)
    

    def _filterargs(source):
        """Juice from a source file the four args needed by decoder."""
        argsregex = (r"}\s*\('(.*)',\s*(.*?),\s*(\d+),\s*'(.*?)'\.split\('\|'\)")
        args = re.search(argsregex, source, re.DOTALL).groups()

        try:
            payload, radix, count, symtab = args
            radix = 36 if not radix.isdigit() else int(radix)
            return payload, symtab.split('|'), radix, int(count)
        except ValueError:
            raise UnpackingError('Corrupted p.a.c.k.e.r. data.')

    def _replacestrings(source):
        """Strip string lookup table (list) and replace values in source."""
        match = re.search(r'var *(_\w+)\=\["(.*?)"\];', source, re.DOTALL)

        if match:
            varname, strings = match.groups()
            startpoint = len(match.group(0))
            lookup = strings.split('","')
            variable = '%s[%%d]' % varname
            for index, value in enumerate(lookup):
                source = source.replace(variable % index, '"%s"' % value)
            return source[startpoint:]
        return source

    def unpack(source):
        """Unpacks P.A.C.K.E.R. packed js code."""
        payload, symtab, radix, count = _filterargs(source)

        if count != len(symtab):
            raise UnpackingError('Malformed p.a.c.k.e.r. symtab.')

        try:
            unbase = Unbaser(radix)
        except TypeError:
            raise UnpackingError('Unknown p.a.c.k.e.r. encoding.')

        def lookup(match):
            """Look up symbols in the synthetic symtab."""
            word = match.group(0)
            return symtab[unbase(word)] or word

        source = re.sub(r'\b\w+\b', lookup, payload)
        return _replacestrings(source)

    class Unbaser(object):
        """Functor for a given base. Will efficiently convert
        strings to natural numbers."""
        ALPHABET = {
            62: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
            95: (' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'
                 '[\]^_`abcdefghijklmnopqrstuvwxyz{|}~')
        }

        def __init__(self, base):
            self.base = base

            # If base can be handled by int() builtin, let it do it for us
            if 2 <= base <= 36:
                self.unbase = lambda string: int(string, base)
            else:
                if base < 62:
                    self.ALPHABET[base] = self.ALPHABET[62][0:base]
                elif 62 < base < 95:
                    self.ALPHABET[base] = self.ALPHABET[95][0:base]
                # Build conversion dictionary cache
                try:
                    self.dictionary = dict((cipher, index) for index, cipher in enumerate(self.ALPHABET[base]))
                except KeyError:
                    raise TypeError('Unsupported base encoding.')

                self.unbase = self._dictunbaser

        def __call__(self, string):
            return self.unbase(string)

        def _dictunbaser(self, string):
            """Decodes a  value to an integer."""
            ret = 0
            for index, cipher in enumerate(string[::-1]):
                ret += (self.base ** index) * self.dictionary[cipher]
            return ret

    test = "eval(function"+match[0]
    res = (unpack(test))
    link = re.compile("src:(.+?),",re.DOTALL).findall(res)
    link = link[0].replace("\\'", "")
    User_Agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36'
    flink = link +"|User-Agent="+User_Agent
    koding.Show_Busy(status=False )
    info = xbmcgui.ListItem(name, thumbnailImage=image)
    xbmc.Player().play(flink,info)
    stop()