Example #1
0
def resolve(url):
    try:
        result = client.request(url)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': 'Watch Free!'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)
        result = result.replace('\\/', '/').replace('\n', '').replace('\'', '"').replace(' ', '')

        swfUrl = re.compile('\.embedSWF\("(.+?)"').findall(result)[0]
        swfUrl = urlparse.urljoin(url, swfUrl)

        streamer = re.compile('flashvars=.+?"file":"(.+?)"').findall(result)[0]

        playpath = re.compile('flashvars=.+?p2pkey:"(.+?)"').findall(result)[0]

        url = '%s playpath=%s conn=S:%s pageUrl=%s swfUrl=%s swfVfy=true timeout=20' % (streamer, playpath, playpath, url, swfUrl)

        return url
    except:
        return
Example #2
0
def resolve(url):
    try:
        result = client.request(url)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': 'Free Download'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': 'Free Download'})
        try: post.update(captcha.request(result))
        except: pass
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = client.parseDOM(result, "a", ret="onClick")
        url = [i for i in url if i.startswith('window.open')][0]
        url = re.compile('[\'|\"](.+?)[\'|\"]').findall(url)[0]
        return url
    except:
        return
Example #3
0
    def resolve(self, url):
        try:
            result = client.request(url)
            result = result.decode('iso-8859-1').encode('utf-8')

            url = client.parseDOM(result, "div", attrs = { "class": "player-embed" })[0]
            url = client.parseDOM(url, "iframe", ret="src")[0]

            if not 'auengine.com' in url:
                url = client.parseDOM(result, "div", attrs = { "class": "generic-video-item" })
                url = [i for i in url if 'auengine video' in i.lower()][0]
                url = client.parseDOM(url, "a", ret="href")[0]
                url = urlparse.urljoin(self.base_link, url)

                result = client.request(url)
                result = result.decode('iso-8859-1').encode('utf-8')

                url = client.parseDOM(result, "div", attrs = { "class": "player-embed" })[0]
                url = client.parseDOM(url, "iframe", ret="src")[0]

            result = client.request(url)

            url = re.compile("video_link *= *'(.+?)'").findall(result)[0]
            url = urllib.unquote_plus(url)
            return url
        except:
            return
def resolve(url):
    try:
        channel = urlparse.urlparse(url).path
        channel = re.compile('/([\w]+)').findall(channel)[-1]
        domain = urlparse.urlparse(url).netloc


        pageUrl = urlparse.urljoin('http://%s' % domain, channel)

        if 'instagib' in domain: playpath = 'instagib_%s' % channel
        elif 'breakers' in domain: playpath = 'btv_%s' % channel
        elif 'vapers' in domain: playpath = 'vtv_%s' % channel
        else: playpath = 'live_%s' % channel


        result = client.request(pageUrl, referer=pageUrl)

        swfUrl = re.compile('"(/\d+/swf/[0-9A-Za-z]+\.swf)').findall(result)[0]
        swfUrl = urlparse.urljoin(pageUrl, swfUrl)


        infoUrl = 'http://mvn.vaughnsoft.net/video/edge/%s_%s' % (domain, channel)
        result = client.request(infoUrl)

        streamer = re.compile('(.+?);').findall(result)[0]
        streamer = 'rtmp://%s/live' % streamer

        app = re.compile('mvnkey-(.+)').findall(result)[0]
        app = 'live?%s' % app

        url = '%s app=%s playpath=%s pageUrl=%s swfUrl=%s swfVfy=true live=true timeout=20' % (streamer, app, playpath, pageUrl, swfUrl)

        return url
    except:
        return
Example #5
0
def resolve(url):
    try:
        if '/vod/' in url:
            url = re.compile('/(\d+)').findall(url)[-1]
            url = 'http://www.filmon.com/vod/info/%s' % url
        elif '/tv/' in url:
            url = url.replace('/tv/', '/channel/')
        elif not '/channel/' in url:
            raise Exception()


        headers = {'X-Requested-With': 'XMLHttpRequest'}

        result = client.request(url, headers=headers)
        result = json.loads(result)

        try:
            result = result['streams']
        except:
            result = result['data']['streams']
            result = [i[1] for i in result.iteritems()]

        strm = [(i['url'], int(i['watch-timeout'])) for i in result]
        strm = [i for i in strm if '.m3u8' in i[0]]
        strm.sort()
        strm = strm[-1][0]

        url = client.request(strm).splitlines()
        url = [i for i in url if '.m3u8' in i]
        if len(url) == 0: return strm
        url = urlparse.urljoin(strm, url[0])

        return url
    except:
        return
Example #6
0
def resolve(url):
    try:
        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://grifthost.com/embed-%s.html' % url

        result = client.request(url)

        try:
            post = {}
            f = client.parseDOM(result, "Form", attrs = { "method": "POST" })[0]
            f = f.replace('"submit"', '"hidden"')
            k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
            for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
            post = urllib.urlencode(post)
            result = client.request(url, post=post)
        except:
            pass

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, "embed", ret="src")
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]

        return url
    except:
        return
Example #7
0
def resolve(url):
    try:
        result = client.request(url)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })[0]
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': ' '})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })[0]
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': ' '})
        post.update(captcha.request(result))
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = re.compile("var\s+download_url *= *'(.+?)'").findall(result)[0]
        return url
    except:
        return
Example #8
0
def resolve(url):
    try:
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://www.movdivx.com/%s' % url
 
        result = client.request(url)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "action": "" })[0]
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': 'Free Download'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, "embed", ret="src")
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]

        return url
    except:
        return
Example #9
0
def resolve(url):
    try:
        user = control.setting('movreel_user')
        password = control.setting('movreel_password')

        login = 'http://movreel.com/login.html'
        post = {'op': 'login', 'login': user, 'password': password, 'redirect': url}
        post = urllib.urlencode(post)
        result = client.request(url, close=False)
        result += client.request(login, post=post, close=False)

        post = {}
        f = client.parseDOM(result, "Form", attrs = { "name": "F1" })[-1]
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post.update({'method_free': '', 'method_premium': ''})
        post = urllib.urlencode(post)

        request = urllib2.Request(url, post)

        for i in range(0, 3):
            try:
                response = urllib2.urlopen(request, timeout=10)
                result = response.read()
                response.close()
                url = re.compile('(<a .+?</a>)').findall(result)
                url = [i for i in url if 'Download Link' in i][-1]
                url = client.parseDOM(url, "a", ret="href")[0]
                return url
            except:
                time.sleep(1)
    except:
        return
Example #10
0
def resolve(url):
    try:
        result = client.request(url, mobile=True, close=False)

        try:
            post = {}
            f = client.parseDOM(result, "Form", attrs = { "method": "POST" })[0]
            f = f.replace('"submit"', '"hidden"')
            k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
            for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
            post = urllib.urlencode(post)
        except:
            post=None

        for i in range(0, 10):
            try:
                result = client.request(url, post=post, mobile=True, close=False)
                result = result.replace('\n','')

                result = re.compile('sources *: *\[.+?\]').findall(result)[-1]
                result = re.compile('file *: *"(http.+?)"').findall(result)

                url = [i for i in result if '.m3u8' in i]
                if len(url) > 0: return url[0]
                url = [i for i in result if not '.m3u8' in i]
                if len(url) > 0: return url[0]
            except:
                time.sleep(1)
    except:
        return
Example #11
0
def resolve(url):
    try:
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://180upload.com/embed-%s.html' % url

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, "form", attrs = { "id": "captchaForm" })[0]
        k = client.parseDOM(f, "input", ret="name", attrs = { "type": "hidden" })
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, "embed", ret="src")
        url += re.compile("'file' *, *'(.+?)'").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]

        return url
    except:
        return
Example #12
0
    def resolve(self, url):
        try:
            result = client.request(url)
            if not "my_video" in result:
                cookie = client.request(self.sign_link, post=self.key_link, output="cookie")
                result = client.request(url, cookie=cookie)

            url = None
            try:
                url = client.parseDOM(result, "source", ret="src", attrs={"type": "video/webm"})[0]
            except:
                pass
            try:
                url = client.parseDOM(result, "source", ret="src", attrs={"type": "video/mp4"})[0]
            except:
                pass

            if url == None:
                return
            url = urlparse.urljoin(self.base_link, url)
            url = "%s|Cookie=%s" % (url, urllib.quote_plus("video=true"))

            return url
        except:
            return
    def resolve(self, url):
        try:
            query = urlparse.urljoin(self.base_link, self.login_link)
            post = urllib.urlencode({'login': self.user, 'pwd': self.password})
            cookie = client.request(query, post=post, output='cookie')

            result = client.request(url, cookie=cookie)
            url = client.parseDOM(result, "location")[0]
            return url
        except:
            return
Example #14
0
def resolve(url):
    try:
        result = client.request(url, close=False)

        f = client.parseDOM(result, "a", ret="href", attrs = { "id": "go-next" })[0]
        f = urlparse.urljoin(url, f)

        result = client.request(f)

        url = re.compile("var\s+lnk\d* *= *'(http.+?)'").findall(result)[0]
        return url
    except:
        return
Example #15
0
    def resolve(self, url):
        try:
            if urlparse.urlparse(url).netloc in self.base_link:
                return self.__resolve(client.request(url))

            if url.startswith('stack://'): return url

            url = client.request(url, output='geturl')
            if 'requiressl=yes' in url: url = url.replace('http://', 'https://')
            else: url = url.replace('https://', 'http://')
            return url
        except:
            return
Example #16
0
def resolve(url):
    try:
        base = url.replace('https://', 'http://')
        result = str(client.request(base))

        u = re.compile('url(720|540|480|360|240)=(.+?)&').findall(result)

        url = []
        try: url += [[{'quality': 'HD', 'url': i[1]} for i in u if i[0] == '720'][0]]
        except: pass
        try: url += [[{'quality': 'SD', 'url': i[1]} for i in u if i[0] == '540'][0]]
        except: pass
        try: url += [[{'quality': 'SD', 'url': i[1]} for i in u if i[0] == '480'][0]]
        except: pass
        if not url == []: return url
        try: url += [[{'quality': 'SD', 'url': i[1]} for i in u if i[0] == '360'][0]]
        except: pass
        if not url == []: return url
        try: url += [[{'quality': 'SD', 'url': i[1]} for i in u if i[0] == '240'][0]]
        except: pass

        if not url == []: return url


        try: s = 'http://www.vkvideosearch.com/video.php?v=%s' % re.compile('video(.+_.+)').findall(base)[0]
        except: pass
        try: s = 'http://www.vkvideosearch.com/video.php?v=%s_%s' % (urlparse.parse_qs(urlparse.urlparse(base).query)['oid'][0], urlparse.parse_qs(urlparse.urlparse(base).query)['id'][0])
        except: pass
        result = str(client.request(s))

        u = re.compile('<a href="(.+?)">(720|540|480|360|240)p</a>').findall(result)

        url = []
        try: url += [[{'quality': 'HD', 'url': i[0]} for i in u if i[1] == '720'][0]]
        except: pass
        try: url += [[{'quality': 'SD', 'url': i[0]} for i in u if i[1] == '540'][0]]
        except: pass
        try: url += [[{'quality': 'SD', 'url': i[0]} for i in u if i[1] == '480'][0]]
        except: pass
        if not url == []: return url
        try: url += [[{'quality': 'SD', 'url': i[0]} for i in u if i[1] == '360'][0]]
        except: pass
        if not url == []: return url
        try: url += [[{'quality': 'SD', 'url': i[0]} for i in u if i[1] == '240'][0]]
        except: pass

        if not url == []: return url

    except:
        return
Example #17
0
def resolve(url):
    try:
        result = client.request(url, mobile=True)
        url = client.parseDOM(result, "source", ret="src", attrs={"type": "video.+?"})[0]
        return url
    except:
        return
Example #18
0
def resolve(url):
    try:
        result = client.request(url)
        post = {}
        try: f = client.parseDOM(result, "form", attrs = { "method": "POST" })[0]
        except: f = ''
        k = client.parseDOM(f, "input", ret="name")
        for i in k: post.update({i: client.parseDOM(f, "input", ret="value", attrs = { "name": i })[0]})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = re.compile("var\s+lnk\d* *= *'(http.+?)'").findall(result)[0]
        return url
    except:
        return
Example #19
0
def resolve(url):
    try:
        result = client.request(url)
        url = re.compile("file *: *'(http.+?)'").findall(result)[-1]
        return url
    except:
        return
Example #20
0
def resolve(url):
    try:
        result = client.request(url, close=False)

        post = {}
        f = client.parseDOM(result, "Form", attrs={"action": ""})
        k = client.parseDOM(f, "input", ret="name", attrs={"type": "hidden"})
        for i in k:
            post.update({i: client.parseDOM(f, "input", ret="value", attrs={"name": i})[0]})
        post.update(captcha.request(result))
        post = urllib.urlencode(post)

        request = urllib2.Request(url, post)

        for i in range(0, 5):
            try:
                response = urllib2.urlopen(request, timeout=10)
                result = response.read()
                response.close()
                if "download2" in result:
                    raise Exception()
                url = client.parseDOM(result, "a", ret="href", attrs={"target": ""})[0]
                return url
            except:
                time.sleep(1)
    except:
        return
Example #21
0
def resolve(url):
    try:
        try: oid, id = urlparse.parse_qs(urlparse.urlparse(url).query)['oid'][0] , urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        except: oid, id = re.compile('\/video(.*)_(.*)').findall(url)[0]
        try: hash = urlparse.parse_qs(urlparse.urlparse(url).query)['hash'][0]
        except: hash = _hash(oid, id)

        u = 'http://api.vk.com/method/video.getEmbed?oid=%s&video_id=%s&embed_hash=%s' % (oid, id, hash)

        result = client.request(u)
        result = json.loads(result)
        result = result['response']

        url = []
        try: url += [{'quality': 'HD', 'url': result['url720']}]
        except: pass
        try: url += [{'quality': 'SD', 'url': result['url540']}]
        except: pass
        try: url += [{'quality': 'SD', 'url': result['url480']}]
        except: pass
        if not url == []: return url
        try: url += [{'quality': 'SD', 'url': result['url360']}]
        except: pass
        if not url == []: return url
        try: url += [{'quality': 'SD', 'url': result['url240']}]
        except: pass

        if not url == []: return url

    except:
        return
Example #22
0
def nhlResolve(url):
    try:
        try: url, selectGame, side = re.compile('(.+?)x0xe(.+?)x0xe(.+?)$').findall(url)[0]
        except: selectGame, side = None, None

        header = '|' + urllib.urlencode({'User-Agent': 'PS4 libhttp/1.76 (PlayStation 4)'})
        base = re.compile('(.*/).+[.]m3u8').findall(url)

        if not url.endswith('m3u8'):
            return player().run(url + header, selectGame ,side)

        result = client.request(url)

        result = re.compile('BANDWIDTH=(\d*)\n(.+?[.]m3u8)').findall(result)
        result = [(int(int(i[0]) / 1000), i[1]) for i in result]
        result = sorted(result, reverse=True)
        result = [(str(i[0]), base[0] + i[1]) for i in result]

        q = [i[0] for i in result]
        u = [i[1] for i in result]
        select = control.selectDialog(q, 'Pick A Bandwidth')
        if select == -1: return
        url = u[select]

        player().run(url + header, selectGame ,side)
    except:
        return
Example #23
0
 def resolve(self, url):
     try:
         url = client.request(url, output='geturl')
         url = resolvers.request(url)
         return url
     except:
         return
Example #24
0
def resolve(url):
    try:
        result = client.request(url)
        result = result.replace('\r','').replace('\n','').replace('\t','')

        result = result.split('"%s"' % (urlparse.urlparse(url).path).split('/')[-1])[-1].split(']]')[0]

        u = re.compile('\d*,\d*,\d*,"(.+?)"').findall(result)
        
        if len(u) == 0:
            u = re.compile('"url"\s*:\s*"([^"]+)"\s*,\s*"height"\s*:\s*\d+\s*,\s*"width"\s*:\s*\d+\s*,\s*"type"\s*:\s*"video/').findall(result)

        u = [i.replace('\\u003d','=').replace('\\u0026','&') for i in u][::-1]
        u = sum([tag(i) for i in u], [])

        url = []
        try: url += [[i for i in u if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
Example #25
0
def nhlDirectory():
    dt = procTimezone(5)
    datex = int(dt.strftime('%Y%m%d'))

    url = 'http://live.nhl.com/GameData/SeasonSchedule-20142015.json'
    result = client.request(url)

    items = json.loads(result)
    items = sorted(items, key=lambda k: k['est'])

    addDirectoryItem('[COLOR red]Archived Games Click Here[/COLOR]', 'Archived', 'nhlArchives', '0', '0')
    addDirectoryItem('[COLOR gold]Live Games , Requires some modifications to get working visit forum.[/COLOR]', '0', '0', '0', '0')
    addDirectoryItem('[COLOR gold]If list returns BLANK, Feed is not up yet.[/COLOR]', '0', '0', '0', '0')

    for item in items:
        try:
            est = datetime.datetime.strptime(item['est'], '%Y%m%d %H:%M:%S')
            date = int(est.strftime('%Y%m%d'))
            if not date == datex: raise Exception()

            est = procTimezone(5, est)
            name = '%s at %s  [COLOR gold](%s)[/COLOR]  [COLOR red](%s)[/COLOR]' % (item['a'], item['h'], est.strftime('%H:%M'), est.strftime('%Y-%m-%d'))
            url = str(item['id'])

            addDirectoryItem(name, url, 'nhlStreams', '0', '0')
        except:
            pass

    endDirectory()
Example #26
0
def nhlArchives():

    dt = procTimezone(5)
    datex = int(dt.strftime('%Y%m%d'))

    url = 'http://live.nhl.com/GameData/SeasonSchedule-20142015.json'
    result = client.request(url)

    items = json.loads(result)
    items = sorted(items, key=lambda k: k['est'])[::-1]

    for item in items:
        try:
            est = datetime.datetime.strptime(item['est'], '%Y%m%d %H:%M:%S')
            date = int(est.strftime('%Y%m%d'))
            if not date <= datex: raise Exception()

            est = procTimezone(5, est)
            name = '%s at %s  [COLOR gold](%s)[/COLOR]  [COLOR red](%s)[/COLOR]' % (item['a'], item['h'], est.strftime('%H:%M'), est.strftime('%Y-%m-%d'))
            url = str(item['id'])

            addDirectoryItem(name, url, 'nhlStreams', '0', '0')
        except:
            pass

    endDirectory()
Example #27
0
 def resolve(self, url):
     try:
         result = client.request(url)
         url = re.compile("'file': '(.+?)'").findall(result)[0]
         return url
     except:
         return
Example #28
0
def resolve(url):
    try:
        result = client.request(url, mobile=True)
        url = re.compile('file *: *"(http.+?)"').findall(result)[0]
        return url
    except:
        return
Example #29
0
def resolve(url):
    try:
        result = client.request(url)
        url = re.compile('path *: *"(http.+?)"').findall(result)[-1]
        return url
    except:
        return
def resolve(url):
    try:
        result = client.request(url)
        result = result.replace("\r", "").replace("\n", "").replace("\t", "")

        u = re.compile('"\d*/\d*x\d*.+?","(.+?)"').findall(result)[0]
        u = urllib.unquote_plus(u).decode("unicode-escape")
        u = re.compile("(http.+?)\s").findall(u)
        u = [re.sub(r"(=m\d*).+", r"\1", i) for i in u]
        u = sum([tag(i) for i in u], [])

        url = []
        try:
            url += [[i for i in u if i["quality"] == "1080p"][0]]
        except:
            pass
        try:
            url += [[i for i in u if i["quality"] == "HD"][0]]
        except:
            pass
        try:
            url += [[i for i in u if i["quality"] == "SD"][0]]
        except:
            pass

        if url == []:
            return
        return url
    except:
        return