Esempio n. 1
0
def resolve(url):
    try:
        result = cloudflare.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 = cloudflare.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
Esempio n. 2
0
def resolve(url):
    try:
        result = cloudflare.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!'})

        result = cloudflare.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
def resolve(url):
    test = '|User-Agent=Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +https://www.cloudflare.com/always-online) AppleWebKit/534.34'
    try:
        
        result = cloudflare.request(url)
        uri = re.findall("decodeURIComponent\(atob\('(.+?)'",result)[0]
        while not ('http') in uri:
            uri = base64.b64decode(uri)
            if not ('http') in uri:
                uri = re.findall("'(.+?)'",uri)[0]
            else:
                pass
        murl = re.findall('"src":"(.+?)"',uri)[0]  
            
    except:
        return None
    try:
        result = cloudflare.request(murl)
        items = client.parseDOM(result, 'video', attrs={'id': 'player'})
        url = client.parseDOM(items, 'source', ret='src')[0]
        if ('http') in url: return url+test
        if url[0]!='/':
            url='http://www.iptvlinks.tk/'+url+test
        else:
            url='http://www.iptvlinks.tk'+url+test      
        return url
    except:
        return None
Esempio n. 4
0
def GET_SEARCH_FOLDERS(url, name):
    Check_haters()
    try:
        link = open_url(url)
    except:
        link = cloudflare.request(url, mobile=True)
    match = re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(
        link)
    match2 = re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link)
    match3 = re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(
        link)
    match4 = re.compile(
        'name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
    for name, thumb, url in match:
        if "archive" in str(url):
            addDir2(name, url, 9, thumb, fanart)
        else:
            addLink(name, url, 101, thumb, thumb)
    for name, url in match2:
        if "archive" in str(url):
            addDir2(name, url, 9, icon, fanart)
        else:
            addLink(name, url, 101, icon, fanart)
    for name, date, url in match3:
        if "archive" in str(url):
            addDir2(name, url, 9, icon, fanart)
        else:
            addLink(name, url, 101, icon, fanart)
    for name, thumb, date, url in match4:
        if "archive" in str(url):
            addDir2(name, url, 9, thumb, fanart)
        else:
            addLink(name, url, 101, thumb, fanart)
Esempio n. 5
0
    def resolve(self, url):
        try:
            idx = int(re.compile('/(\d+)').findall(url)[-1])

            result = cloudflare.request(url)

            url = client.parseDOM(result, 'item')[idx]
            url = re.compile("file *= *[\'|\"](.+?)[\'|\"]").findall(url)
            url = [i for i in url if not i.endswith('.srt')][0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            if 'google' in url:
                url = client.request(url, output='geturl')
                if 'requiressl=yes' in url:
                    url = url.replace('http://', 'https://')
                else:
                    url = url.replace('https://', 'http://')

            else:
                url = '%s|User-Agent=%s' % (url,
                                            urllib.quote_plus(client.agent()))

            return url
        except:
            return
Esempio n. 6
0
def GETJLIST(url,name):
	Check_haters()

	try:link = open_url(url)
	except:link = cloudflare.request(url, mobile=True)
	all_links = regex_get_all(link, '<channel>', '</channel>')
	for list in all_links:
		dir = regex_from_to(list, '<externallink>', '</externallink>')
		name = regex_from_to(list, '<name>', '</name>')
		url = regex_from_to(list, '<link>', '</link>')
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if "ignore" in url:
			addDir2(name,dir,30,thumb,fanart)
		
	item_links = regex_get_all(link, '<item>', '</item>')
	for list in item_links:
		name = regex_from_to(list, '<title>', '</title>')
		url = regex_from_to(list, '<link>', '</link>')
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if url:
			if "sublink" in url:
				addDir2(name,url,31,thumb,fanart)
			else:
				addLink(name,url,101,thumb,fanart)
	youtube_links = regex_get_all(link, '<item>', '</item>')
	for list in youtube_links:
		name = regex_from_to(list, '<title>', '</title>')
		url = regex_from_to(list, '<utube>', '</utube>')
		url = "https://www.youtube.com/watch?v=" + url
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if url:
			if "sublink" in url:
				addDir2(name,url,31,thumb,fanart)
			else:
				addLink(name,url,101,thumb,fanart)
Esempio n. 7
0
    def resolve(self, url):
        try:
            url, headers = url.split('|')

            idx = int(re.compile('/(\d+)').findall(url)[-1])

            result = cloudflare.request(url)

            url = client.parseDOM(result, 'item')
            url = [
                i for i in url if not 'youtube.com' in i and not '>Intro<' in i
            ][idx]
            url = re.compile("file *= *[\'|\"](.+?)[\'|\"]").findall(url)
            url = [i for i in url if not i.endswith('.srt')][0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            if 'google' in url:
                url = client.request(url, output='geturl')
                if 'requiressl=yes' in url:
                    url = url.replace('http://', 'https://')
                else:
                    url = url.replace('https://', 'http://')

            else:
                url = '%s|%s' % (url, headers)

            return url
        except:
            return
    def resolve(self, url):
        try:
            url, headers = url.split('|')

            idx = int(re.compile('/(\d+)').findall(url)[-1])

            result = cloudflare.request(url)

            url = client.parseDOM(result, 'item')
            url = [i for i in url if not 'youtube.com' in i and not '>Intro<' in i][idx]
            url = re.compile("file *= *[\'|\"](.+?)[\'|\"]").findall(url)
            url = [i for i in url if not i.endswith('.srt')][0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            if 'google' in url:
                url = client.request(url, output='geturl')
                if 'requiressl=yes' in url: url = url.replace('http://', 'https://')
                else: url = url.replace('https://', 'http://')

            else:
                url = '%s|%s' % (url, headers)

            return url
        except:
            return
Esempio n. 9
0
def CartoonCrazy(image, fanart):

    addDirectoryItem('[B]SEARCH[/B]', 'CCsearch', '0',
                     mediaPath + 'CCsearch.png', fanart, '')

    try:
        url = 'http://kisscartoon.me/CartoonList/'

        result = cloudflare.request(url)

        items = client.parseDOM(result, 'div', attrs={'id': 'container'})
        items = client.parseDOM(items, 'div', attrs={'id': 'rightside'})
        items = client.parseDOM(items, 'div', attrs={'class': 'barContent'})[1]
        items = client.parseDOM(items, 'a', ret='href')
    except:
        return

    for item in items:
        try:
            name = '[B]' + item[7:] + '[/B]'
            name = client.replaceHTMLCodes(name)
            name = name.encode('utf-8')

            url = item
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            addDirectoryItem(name, 'CCcat', image, image, fanart, url)
        except:
            pass

    endDirectory()
Esempio n. 10
0
def CCpart(url, image, fanart):
    try:
        url = urlparse.urljoin('http://kisscartoon.me', url)

        result = cloudflare.request(url)

        items = client.parseDOM(result, 'table', attrs={'class': 'listing'})
        items = client.parseDOM(items, 'td')
        items = zip(client.parseDOM(items, 'a', ret='href'), client.parseDOM(items, 'a'))

        if len(items) == 1: return CCstream(items[0][0])
    except:
        return

    for item in items[::-1]:
        try:
            name = item[1]
            name = name.replace('\n', '')
            name = client.replaceHTMLCodes(name)
            name = name.encode('utf-8')

            url = item[0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            addDirectoryItem(name,'CCstream',image,image,fanart,url)
        except:
            pass

    episodeCategory()
Esempio n. 11
0
def GETJLIST(url,name):
	Check_haters()

	try:link = open_url(url)
	except:link = cloudflare.request(url, mobile=True)
	all_links = regex_get_all(link, '<channel>', '</channel>')
	for list in all_links:
		dir = regex_from_to(list, '<externallink>', '</externallink>')
		name = regex_from_to(list, '<name>', '</name>')
		url = regex_from_to(list, '<link>', '</link>')
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if "ignore" in url:
			addDir2(name,dir,30,thumb,fanart)
		
	item_links = regex_get_all(link, '<item>', '</item>')
	for list in item_links:
		name = regex_from_to(list, '<title>', '</title>')
		url = regex_from_to(list, '<link>', '</link>')
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if url:
			if "sublink" in url:
				addDir2(name,url,31,thumb,fanart)
			else:
				addLink(name,url,101,thumb,fanart)
	youtube_links = regex_get_all(link, '<item>', '</item>')
	for list in youtube_links:
		name = regex_from_to(list, '<title>', '</title>')
		url = regex_from_to(list, '<utube>', '</utube>')
		url = "https://www.youtube.com/watch?v=" + url
		thumb = regex_from_to(list, '<thumbnail>', '</thumbnail>')
		if url:
			if "sublink" in url:
				addDir2(name,url,31,thumb,fanart)
			else:
				addLink(name,url,101,thumb,fanart)
Esempio n. 12
0
def CartoonCrazy(image, fanart):

    addDirectoryItem('[B]SEARCH[/B]', 'CCsearch', '0', mediaPath+'CCsearch.png', fanart, '')

    try:
        url = 'http://kisscartoon.me/CartoonList/'

        result = cloudflare.request(url)

        items = client.parseDOM(result, 'div', attrs={'id': 'container'})
        items = client.parseDOM(items, 'div', attrs={'id': 'rightside'})
        items = client.parseDOM(items, 'div', attrs={'class': 'barContent'})[1]       
        items = client.parseDOM(items, 'a', ret='href')
    except:
        return

    for item in items:
        try:
            name = '[B]'+ item[7:] +'[/B]'
            name = client.replaceHTMLCodes(name)
            name = name.encode('utf-8')

            url = item
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            addDirectoryItem(name, 'CCcat', image, image, fanart, url)
        except:
            pass

    endDirectory()
Esempio n. 13
0
def GET_SEARCH_FOLDERS(url,name):
        Check_haters()
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match2=re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match3=re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match4=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
        for name,thumb,url in match:
			if "archive" in str(url):
				addDir2(name,url,9,thumb,fanart)
			else:
				addLink(name,url,101,thumb,thumb)
        for name,url in match2:
			if "archive" in str(url):
				addDir2(name,url,9,icon,fanart)
			else:
				addLink(name,url,101,icon,fanart)
        for name,date,url in match3:
			if "archive" in str(url):
				addDir2(name,url,9,icon,fanart)
			else:
				addLink(name,url,101,icon,fanart)
        for name,thumb,date,url in match4:
			if "archive" in str(url):
				addDir2(name,url,9,thumb,fanart)
			else:
				addLink(name,url,101,thumb,fanart)
Esempio n. 14
0
def resolve(url):
    try:
        result = cloudflare.request(url, mobile=True)
        url = re.compile('file *: *"(http.+?)"').findall(result)[0]
        return url
    except:
        return
    def resolve(self, url):
        try:
            url, headers = url.split("|")

            idx = int(re.compile("/(\d+)").findall(url)[-1])

            result = cloudflare.request(url)

            url = client.parseDOM(result, "item")[idx]
            url = re.compile("file *= *['|\"](.+?)['|\"]").findall(url)
            url = [i for i in url if not i.endswith(".srt")][0]
            url = client.replaceHTMLCodes(url)
            url = url.encode("utf-8")

            if "google" in url:
                url = client.request(url, output="geturl")
                if "requiressl=yes" in url:
                    url = url.replace("http://", "https://")
                else:
                    url = url.replace("https://", "http://")

            else:
                url = "%s|%s" % (url, headers)

            return url
        except:
            return
Esempio n. 16
0
def CCpart(url, image, fanart):
    try:
        url = urlparse.urljoin('http://kisscartoon.me', url)

        result = cloudflare.request(url)

        items = client.parseDOM(result, 'table', attrs={'class': 'listing'})
        items = client.parseDOM(items, 'td')
        items = zip(client.parseDOM(items, 'a', ret='href'),
                    client.parseDOM(items, 'a'))

        if len(items) == 1: return CCstream(items[0][0])
    except:
        return

    for item in items[::-1]:
        try:
            name = item[1]
            name = name.replace('\n', '')
            name = client.replaceHTMLCodes(name)
            name = name.encode('utf-8')

            url = item[0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            addDirectoryItem(name, 'CCstream', image, image, fanart, url)
        except:
            pass

    episodeCategory()
Esempio n. 17
0
def GETLIVE(url,name):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
       
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        match2=re.compile('name=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        for name,url in match2:
				addDir2(name,url,101,icon,'')
Esempio n. 18
0
 def resolve(self, url):
     try:
         result = cloudflare.request(url, mobile=True)
         url = client.parseDOM(result, 'a', ret='href', attrs = {'data-role': 'button'})
         url = [i for i in url if str('.mp4') in i][0]
         return url
     except:
         return
Esempio n. 19
0
def DOCUTUBELINK(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<div class="image-thumb"><a href="(.+?)" class="image-thumb-inner"><img src="(.+?)" alt="(.+?)">').findall(link)
        matchnext=re.compile('<li class="next">\s*<a rel="next" href="(.+?)">').findall(link)
        for url,img,name in match:	
			addLink(name,url,10,img,img)
Esempio n. 20
0
def GETLIVE(url,name):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
       
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        match2=re.compile('name=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        for name,url in match2:
				addDir2(name,url,101,icon,'')
Esempio n. 21
0
def GETSHOWS(url,name):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        match2=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        for name,thumb,date,url in match:
				addDir2(name,url,5,thumb,fanart)
        for name,thumb,url in match2:
				addDir2(name,url,5,thumb,fanart)
Esempio n. 22
0
def GETSHOWS(url,name):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        match2=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\s*player=').findall(link)
        for name,thumb,date,url in match:
				addDir2(name,url,5,thumb,fanart)
        for name,thumb,url in match2:
				addDir2(name,url,5,thumb,fanart)
def resolve(url):

    try:
        result = cloudflare.request(url)
        items = client.parseDOM(result, 'video', attrs={'id': 'live_player'})
        url = client.parseDOM(items, 'source', ret='src')[0]
        if ('http') in url: return url+'|User-Agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36'
    except:
        return None
Esempio n. 24
0
def resolve(url):

    try:
        result = cloudflare.request(url)
        items = client.parseDOM(result, 'video', attrs={'id': 'live_player'})
        url = client.parseDOM(items, 'source', ret='src')[0]
        if ('http') in url:
            return url + '|User-Agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36'
    except:
        return None
Esempio n. 25
0
def DOCUADDICT(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<a title=".+?" href="(.+?)">\s*<i class=.+?span itemprop="genre">(.+?)</span>').findall(link)
        for url,name in match:	
			name = cleanHex(name)
			name = re.sub('&quot;',' ',name)
			name = re.sub('&amp;',' ',name)
			addDir2(name,url,9,icon,fanart)
Esempio n. 26
0
def DOCUTUBE(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        soup=bs(link)
        tag=soup.find('div',{'class':'panel-body alt categories'})
        match=re.compile('<a href="(.+?)" title=".+?">(.+?)</a>').findall(str(tag))
        for url,name in match:
				url = "http://www.documentarytube.com" + url
				addDir2(name,url,12,icon,fanart)
Esempio n. 27
0
def DOCUHEAVEN(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<li class="cat-item cat-item.+?"><a href="(.+?)".+?>(.+?)</a>').findall(link)
        for url,name in match:	
			name = cleanHex(name)
			name = re.sub('&quot;',' ',name)
			name = re.sub('&amp;',' ',name)
			url = 'http://documentaryheaven.com' + url
			addDir2(name,url,6,icon,fanart)
Esempio n. 28
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        result = cloudflare.request(url, mobile=True)
        url = re.compile('file *: *"(http.+?)"').findall(result)[0]
        url += headers

        return url
    except:
        return
Esempio n. 29
0
 def resolve(self, url):
     try:
         result = cloudflare.request(url, mobile=True)
         url = client.parseDOM(result,
                               'a',
                               ret='href',
                               attrs={'data-role': 'button'})
         url = [i for i in url if str('.mp4') in i][0]
         return url
     except:
         return
Esempio n. 30
0
def PLAYTOPDOCUMENTARIES(url,name,iconimage):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<meta itemprop="embedUrl" content="(.+?)".+?>').findall(link)		
        for url in match:
			try:
				resolved=urlresolver.resolve(url)
				addon.resolve_url(resolved)
			except: 
				stream_url = urlresolver.HostedMediaFile(url).resolve()
				liz = xbmcgui.ListItem(name, iconImage='DefaultVideo.png', thumbnailImage=iconimage)
				xbmc.Player ().play(stream_url,liz,False)
Esempio n. 31
0
def GETLINKSNEW(url,name,iconimage):
		numTries = 7
		host = 0
		urlorig = url
		originalname = name
		try:link = open_url(url)
		except:link = cloudflare.request(url, mobile=True)
		matchlink=re.compile('data-link="(.+?)">').findall(link)
		matchlink2=re.compile("<a style='.+?' href='(.+?)' target='_blank'").findall(link)
		for url in matchlink:
						host=url.split('/')[2].replace('www.','').capitalize()
						addLink(url,url,101,icon,'')
Esempio n. 32
0
def GETLINKSNEW(url,name,iconimage):
		numTries = 7
		host = 0
		urlorig = url
		originalname = name
		try:link = open_url(url)
		except:link = cloudflare.request(url, mobile=True)
		matchlink=re.compile('data-link="(.+?)">').findall(link)
		matchlink2=re.compile("<a style='.+?' href='(.+?)' target='_blank'").findall(link)
		for url in matchlink:
						host=url.split('/')[2].replace('www.','').capitalize()
						addLink(url,url,101,icon,'')
Esempio n. 33
0
def DOCUADDICTPLAY(url,name,iconimage):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('src="(.+?)" frameborder="').findall(link)		
        for url in match:
			try:
				resolved=urlresolver.resolve(url)
				addon.resolve_url(resolved)
			except: 
				stream_url = urlresolver.HostedMediaFile(url).resolve()
				liz = xbmcgui.ListItem(name, iconImage='DefaultVideo.png', thumbnailImage=iconimage)
				xbmc.Player ().play(stream_url,liz,False)	
Esempio n. 34
0
def TOPDOCUMENTARIES(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        soup=bs(link)
        tag=soup.find('nav',{'class':'module clear'})
        match=re.compile('<a href="([^"]+)">(.*?)</a></li>').findall(str(tag))
        for url,name in match:
				name = cleanHex(name)
				name = re.sub('&quot;',' ',name)

				addDir2(name,url,3,icon,fanart)
Esempio n. 35
0
    def resolve(self, url):
        try:
            if urlparse.urlparse(url).netloc in self.base_link:
                return self.__resolve(cloudflare.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
Esempio n. 36
0
def GETFEATURED(url,name):
        Check_haters()
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match2=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+player').findall(link)
        for name,thumb,url in match2: addLink(name,url,101,thumb,fanart)
        url2 = "https://archive.org/download/NaviXPlaylist/HD.xml"
        try:link2 = open_url(url2)
        except:link2 = cloudflare.request(url2, mobile=True)
        matchm=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm2=re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm3=re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm4=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        for name,thumb,url in matchm:
                name=re.sub(r'\.',r' ', name)
                addLink(name,url,101,thumb,thumb)
        for name,url in matchm2:
				addLink(name,url,101,icon,fanart)
        for name,date,url in matchm3:
				addLink(name,url,101,icon,fanart)
        for name,thumb,date,url in matchm4:
				addLink(name,url,101,thumb,fanart)		
Esempio n. 37
0
def Doculoversplay(url,name,iconimage):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('id="playVideo" data-video="(.+?)" data-src="(.+?)">').findall(link)		
        for datavideo,url in match:
			if "youtube" in datavideo: url = "https://www.youtube.com/watch?v=" + url
			try:
				resolved=urlresolver.resolve(url)
				addon.resolve_url(resolved)
			except: 
				stream_url = urlresolver.HostedMediaFile(url).resolve()
				liz = xbmcgui.ListItem(name, iconImage='DefaultVideo.png', thumbnailImage=iconimage)
				xbmc.Player ().play(stream_url,liz,False)					
Esempio n. 38
0
    def resolve(self, url):
        try:
            if urlparse.urlparse(url).netloc in self.base_link:
                return self.__resolve(cloudflare.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
Esempio n. 39
0
def GETFEATURED(url,name):
        Check_haters()
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match2=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+player').findall(link)
        for name,thumb,url in match2: addLink(name,url,101,thumb,fanart)
        url2 = "https://archive.org/download/NaviXPlaylist/HD.xml"
        try:link2 = open_url(url2)
        except:link2 = cloudflare.request(url2, mobile=True)
        matchm=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm2=re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm3=re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        matchm4=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link2)
        for name,thumb,url in matchm:
                name=re.sub(r'\.',r' ', name)
                addLink(name,url,101,thumb,thumb)
        for name,url in matchm2:
				addLink(name,url,101,icon,fanart)
        for name,date,url in matchm3:
				addLink(name,url,101,icon,fanart)
        for name,thumb,date,url in matchm4:
				addLink(name,url,101,thumb,fanart)		
Esempio n. 40
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = cloudflare.request(url, mobile=True)
        url = re.compile('file *: *"(http.+?)"').findall(result)[0]
        url += headers

        return url
    except:
        return
Esempio n. 41
0
def DOCUHEAVENLINK(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<a href="(.+?)" title="(.+?)">\s*<im.+?src="(.+?)"').findall(link)
        matchnext=re.compile('<link rel="next" href="(.+?)"').findall(link)		
			
        for url,name,img in match:	
			name = cleanHex(name)
			name = re.sub('&quot;',' ',name)
			addLink(name,url,7,img,img)
        for url in matchnext:	
			
			addDir2('NEXT >>>',url,6,icon,fanart)
Esempio n. 42
0
def DOCULOVERSMENU(name,url):
	try:link = open_url(url)
	except:link = cloudflare.request(url, mobile=True)
	addDir2('Search','http://documentarylovers.com/?s=',16,icon,fanart)	
	addDir2('Latest Movies','http://documentarylovers.com/film/',13,icon,fanart)
	addDir2('Top Rated','http://documentarylovers.com/film/?r_sortby=highest_rated&r_orderby=desc',13,icon,fanart)
	addDir2('Most Rated','http://documentarylovers.com/film/?r_sortby=most_rated&r_orderby=desc',13,icon,fanart)
	match=re.compile('href="(.+?)" title=".+?" class="genrelinks">(.+?)</a>').findall(link)
	for url,name in match:
		name = cleanHex(name)
		name = re.sub('&quot;',' ',name)
		name = re.sub('&amp;','&',name)
		url = "http://documentarylovers.com" + url
		addDir2('[GENRE] ' + name,url,13,icon,fanart)
Esempio n. 43
0
def TOPDOCUMENTARIESLINK(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
          	
        match=re.compile('<span class="excerptpic"><a href="(.+?)" title="(.+?)"><im.+?src="(.+?)" class="').findall(link)
        matchnext=re.compile('<link rel="next" href="(.+?)".+?>').findall(link)

        for url,name,img in match:
				name = cleanHex(name)
				name = re.sub('&quot;',' ',name)
				addLink(name,url,4,img,img)
        for url in matchnext:

				addDir2('NEXT >>>',url,3,icon,fanart)
Esempio n. 44
0
def DOCULOVERS(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)

        match=re.compile('class="post-thumbnail".+?ref="(.+?)" title="(.+?)".+?ata-original="(.+?)"', re.DOTALL).findall(link)
        matchnext = re.compile('<link\s*rel="next" href="(.+?)"').findall(link)
        for url,name,img in match:
				name = cleanHex(name)
				name = re.sub('&quot;',' ',name)
				name = re.sub('&amp;','&',name)

				addLink(name,url,14,img,fanart)	
        for url in matchnext:
				addDir2('NEXT >>>',url,13,icon,fanart)	
Esempio n. 45
0
def DOCUADDICTLINK(name,url):

        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('<a title="(.+?)" href="(.+?)">\s*<img class="lazy" alt=".+?" src="(.+?)" />').findall(link)
        matchnext=re.compile('<li class="next">\s*<a rel="next" href="(.+?)">').findall(link)
		
        for name,url,img in match:	
			name = cleanHex(name)
			name = re.sub('&quot;',' ',name)
			name = re.sub('&amp;',' ',name)
			addLink(name,url,10,img,img)

        for url in matchnext:	
			url = "http://documentaryaddict.com/" + url
			addDir2('NEXT >>>',url,9,icon,fanart)	
Esempio n. 46
0
def GETEPISODES(url,name):
        try:link = open_url(url)
        except:link = cloudflare.request(url, mobile=True)
        match=re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match2=re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match3=re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
        match4=re.compile('name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
        for name,thumb,url in match:
                name=re.sub(r'\.',r' ', name)
                addLink(name,url,101,thumb,thumb)
        for name,url in match2:
				addLink(name,url,101,icon,fanart)
        for name,date,url in match3:
				addLink(name,url,101,icon,fanart)
        for name,thumb,date,url in match4:
				addLink(name,url,101,thumb,fanart)		
Esempio n. 47
0
    def resolve(self, url):
        try:
            result = cloudflare.request(url)
            result = result.decode('iso-8859-1').encode('utf-8')

            url = client.parseDOM(result, 'div', attrs={'id': 'showvideo'})[0]
            url = url.replace('<IFRAME', '<iframe').replace(' SRC=', ' src=')
            url = client.parseDOM(url, 'iframe', ret='src')[0]
            url = client.replaceHTMLCodes(url)
            try:
                url = urlparse.parse_qs(urlparse.urlparse(url).query)['url'][0]
            except:
                pass

            url = resolvers.request(url)
            return url
        except:
            return
Esempio n. 48
0
def GETMM(url, name):
    Check_haters()
    try:
        link = open_url(url)
    except:
        link = cloudflare.request(url, mobile=True)
    match_random = re.compile(
        'name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+random').findall(link)
    match = re.compile('name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+p').findall(
        link)
    match2 = re.compile('name=(.+?)\s*URL=(.+?)\n+p').findall(link)
    match3 = re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(
        link)
    match4 = re.compile(
        'name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
    match5 = re.compile(
        'name=(.+?)\s*URL=(.+?)\s*thumb=(.+?)\s*player').findall(link)
    for name, thumb, url in match_random:
        addDir2(name, url, 998, thumb, fanart)
    for name, thumb, url in match:
        if "archive" in str(url):
            addDir2(name, url, 6, thumb, fanartmm)
        else:
            addLink(name, url, 101, thumb, fanartmm)
    for name, thumb, date, url in match4:
        if "archive" in str(url):
            addDir2(name, url, 6, thumb, fanartmm)
        else:
            addLink(name, url, 101, thumb, fanartmm)
    for name, url in match2:
        if "archive" in str(url):
            addDir2(name, url, 6, icon2, fanartmm)
        else:
            addLink(name, url, 101, icon2, fanartmm)
    for name, date, url in match3:
        if "archive" in str(url):
            addDir2(name, url, 6, icon2, fanartmm)
        else:
            addLink(name, url, 101, icon2, fanartmm)
    for name, url, thumb in match5:
        if "archive" in str(url):
            addDir2(name, url, 6, icon2, fanartmm)
        else:
            addLink(name, url, 101, thumb, fanartmm)
Esempio n. 49
0
def CCcat(url, image, fanart):
    try:
        url = urlparse.urljoin('http://kisscartoon.me', url)

        result = cloudflare.request(url)
        result = re.sub('<tr\s+.+?>', '<tr>', result)

        items = client.parseDOM(result, 'tr')
    except:
        return

    for item in items:
        try:
            name = client.parseDOM(item, 'a')[0]
            name = name.replace('\n', '')
            name = '[B]' + name + '[/B]'
            name = client.replaceHTMLCodes(name)
            name = name.encode('utf-8')

            url = client.parseDOM(item, 'a', ret='href')[0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            thumb = client.parseDOM(item, 'img', ret='src')[0]
            thumb = thumb.replace('kisscartoon.me', 'cdn-c.whatbest.net')
            thumb = client.replaceHTMLCodes(thumb)
            thumb = thumb.encode('utf-8')

            addDirectoryItem(name, 'CCpart', thumb, image, fanart, url)
        except:
            pass

    try:
        next = client.parseDOM(result, 'ul', attrs={'class': 'pager'})[0]
        next = zip(client.parseDOM(next, 'a', ret='href'),
                   client.parseDOM(next, 'a'))
        next = [i[0] for i in next if 'Next' in i[1]][0]

        addDirectoryItem('[I]NEXT[/I]', 'CCcat', image, image, fanart, next)
    except:
        pass

    movieCategory()
Esempio n. 50
0
def CCstream(url):
    try:
        control.idle()

        url = urlparse.urljoin('http://kisscartoon.me', url)

        result = cloudflare.request(url)

        items = client.parseDOM(result,
                                'select',
                                attrs={'id': 'selectQuality'})
        items = client.parseDOM(items, 'option', ret='value')

        url = []

        for item in items:
            try:
                u = base64.b64decode(item)
                u = u.encode('utf-8')

                if u[-3:] == 'm37': q = '1080P'
                elif u[-3:] == 'm22': q = '720P'
                elif u[-3:] == 'm18': q = '360P'
                else: q = 'UNKNOWN'

                url.append({'q': q, 'u': u})
            except:
                pass

        if len(url) > 1:
            q = [i['q'] for i in url]
            u = [i['u'] for i in url]
            select = control.selectDialog(q)
            if select == -1: return
            url = u[select]

        else:
            url = url[0]['u']

        player().run(url)
    except:
        return
Esempio n. 51
0
def HIFI(name, url):
    Check_haters()
    try:
        link = open_url(url)
    except:
        link = cloudflare.request(url, mobile=True)
    match = re.compile('name=(.+?)\s*URL=(.+?)\n+player').findall(link)
    match2 = re.compile(
        'name=(.+?)\s*thumb=(.+?)\s*URL=(.+?)\n+player').findall(link)
    match3 = re.compile('name=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(
        link)
    match4 = re.compile(
        'name=(.+?)\s*thumb=(.+?)\s*date=(.+?)\s*URL=(.+?)\n+p').findall(link)
    match5 = re.compile(
        'name=(.+?)\s*URL=(.+?)\s*thumb=(.+?)\n+player').findall(link)

    for name, url, thumb in match5:
        if "archive" in str(url):
            addDir2(name, url, 10, thumb, fanarthifi)
        else:
            addLink(name, url, 101, thumb, thumb)

    for name, thumb, url in match2:
        if "archive" in str(url):
            addDir2(name, url, 10, thumb, fanarthifi)
        else:
            addLink(name, url, 101, thumb, thumb)
    for name, thumb, date, url in match4:
        if "archive" in str(url):
            addDir2(name, url, 10, thumb, fanarthifi)
        else:
            addLink(name, url, 101, thumb, fanarthifi)
    for name, url in match:
        if "archive" in str(url):
            addDir2(name, url, 10, icon3, fanarthifi)
        else:
            addLink(name, url, 101, icon3, fanarthifi)
    for name, date, url in match3:
        if "archive" in str(url):
            addDir2(name, url, 10, icon3, fanarthifi)
        else:
            addLink(name, url, 101, icon3, fanarthifi)
Esempio n. 52
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = cloudflare.request(url, mobile=True)

        result = re.compile('file *: *"(http.+?)"').findall(result)

        result = [(i, urlparse.urlparse(i).path) for i in result]
        result = [i for i in result if not i[1].endswith('.mpd')]

        url = [i for i in result if i[1].endswith('.m3u8')]
        url += [i for i in result if not i[1].endswith('.m3u8')]
        url = url[0][0] + headers

        return url
    except:
        return