コード例 #1
0
def GetEpisodes_regex(season_num):
    result = cloudflare.source(season_num)
    matches = re.compile(
        common.Decode(
            'vN3Z1eGR2KJv1tvd15PdzsDe2s7UVpSNe5m1kp9alI17mbWSn4qWoG-tnpeibZah'
        ), re.I + re.M + re.U + re.S).findall(result)
    return matches
コード例 #2
0
ファイル: main.py プロジェクト: yonirom/xbmc-israel
def MostInCategory_regex(url):
	html = cloudflare.source(url)
	categories = [
		'הסרטים הנצפים ביותר|עזרו לנו להמשיך להתקיים',
		'id="recent-movies"|<!--recent movies tab-->',
		'id="top-rated-movies"|<!--top tab-->',
		'id="most-links-movies"|<!--most linked tab-->',
		'id="most-views-tv-shows"|<!--most commented tab-->',
		'id="recent-tv-shows"|<!--recent tv shows-->',
		'id="top-rated-tv-shows"|<!--top tab-->',
		'id="most-links-tv-shows"|<!--most linked tab-->'
	]
	list={}
	for category in categories:
		delim = category.split('|')
		startBlock = html.find(delim[0])
		endBlock = html.find(delim[1], startBlock)
		if delim[0] == 'הסרטים הנצפים ביותר':
			rej = common.Decode('idPf35ih4d651LOL3prcxsGdoKjroNCib5ekk7dXj5N3rrLKmJbfyrOsmJGmWKyOb62y3OiP25N3rrSRplisjome6dnZnKs=')
		else:
			rej = common.Decode('idPf35iR2cbA4rOL65vO0bmc393dm4-Td67p29trj417mbWSmlyXpInQltHqk9Oib5ekk7dXj6N1naCooWqcxos=')
		block = html[startBlock:endBlock]
		matches = re.compile(rej, re.I+re.M+re.U+re.S).findall(block)
		items = []
		for match in matches:
			items.append({"image": match[0] if baseUrl in match[0] else "{0}{1}".format(baseUrl, match[0]), "url": '{0}{1}'.format(baseUrl, match[1]), "name": match[2]})
		list[category] = items
	return list
コード例 #3
0
def ResolveUrl(url):
    link = False
    try:
        result = cloudflare.source(url)
        matches = re.compile(
            '<div id="embed_code".+?<iframe.+?src=["|\'](.*?)["|\'].+?<\/iframe><\/div>',
            re.I + re.M + re.U + re.S).findall(result)
        url = matches[0]
        if url.find('//') == 0:
            url = 'http:{0}'.format(url)
        if "divxpress" in url:
            html = common.OPEN_URL(url)
            matches = re.compile(
                'input type="hidden" name="(.*?)" value="(.*?)"',
                re.I + re.M + re.U + re.S).findall(html)
            user_data = {}
            for match in matches:
                user_data[match[0]] = match[1]
            html = common.OPEN_URL(url, user_data=user_data)
            matches = re.compile(
                "<div id=\"player_code\"><script type='text/javascript'>(.*?)</script></div>",
                re.I + re.M + re.U + re.S).findall(html)
            unpack = jsunpack.unpack(matches[0])
            matches = re.compile('"src"value="(.*?)"',
                                 re.I + re.M + re.U + re.S).findall(unpack)
            link = "{0}|User-Agent={1}&Referer={2}".format(
                matches[0],
                'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3',
                url)
        elif "vidzi" in url:
            html = common.OPEN_URL(url)
            matches = re.compile(
                "<script type='text/javascript'>(.*?)</script>",
                re.I + re.M + re.U + re.S).findall(html)
            unpack = jsunpack.unpack(matches[0])
            matches = re.compile('file\s*:\s*"([^"]+)',
                                 re.I + re.M + re.U + re.S).findall(unpack)
            link = "{0}|Referer=http://vidzi.me/nplayer/jwplayer.flash.swf".format(
                matches[0])
        elif "uptostream" in url:
            html = common.OPEN_URL(url)
            matches = re.compile("source src='(.+?)'").findall(html)
            link = "{0}".format(matches[-1])
            matches = re.compile("subtitles' src='(.+?)'").findall(html)
            subtitles = matches[0] if len(matches) > 0 else ''
            link = "{0};;{1}".format('http:' + link, 'http:' + subtitles)

        else:
            if "movreel" in url:
                url = url.replace("/embed-", "/")
            elif "openload" in url:
                url = url.replace(".co", ".io")
                xbmc.log(str(url) + ">>>>>>>" * 40)
            item = urlresolver.HostedMediaFile(url)
            xbmc.log(str(item) + "?????????" * 40)
            link = urlresolver.resolve(item.get_url())
            xbmc.log(str(link) + "<<<<" * 40)
    except Exception, e:
        print e
コード例 #4
0
def Play_link(url):
    html = cloudflare.source(url)
    match = re.compile('file: "(.+?)",.+?label: "(.+?)",',
                       re.DOTALL).findall(html)
    for url, name in match:
        addDirPand(name, url, 10, '', '', '')

    xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_TITLE)
コード例 #5
0
ファイル: main.py プロジェクト: yonirom/xbmc-israel
def IndexPage_regex(url): 
	result = cloudflare.source(url)
	last_page, step = GetPagegSteps(result, int(url.split('/')[-1]))
	matches = re.compile(common.Decode('idPf35iX0aJv3OXf4ZPJyXiRlszkj-DYipHfzNeR3NPB0N_X3aCPo6nioZGmWKyOidjj0Jih38iKkZ6Xom2Wh3uZtaXgYauhro_e292Uqod1naCooVCrjXuZtZK0XJekid-WzOSP4NiKkd_M16LS3cGRtMXrWZWTd66fxetZqcF837Q='),re.S).findall(result)
	list=[]
	for match in matches:
		image=' '
		list.append(match + (image,))
	return list, last_page, step
コード例 #6
0
def GetSeasons_regex(series_num):
    result = cloudflare.source(
        common.Decode('yJ_zmO-P4ci13OXf4ZPglLTU6sjrk87YvN3pmPNf6g==').format(
            baseUrl, series_num))
    matches = re.compile(
        common.Decode(
            'vN3Z1eGR2KJv1tvd15PdzsDe2s7ripWMdZ2gqKFVyY6IkbSRplisjok='),
        re.I + re.M + re.U + re.S).findall(result)
    return matches
コード例 #7
0
def Recent_Scraped(url):
    html = cloudflare.source(url)
    match = re.compile(
        '<li id=".+?">.+?<a href="(.+?)">.+?<img width="40" height="40" src="(.+?)" alt=""/>.+?<span class="title">\n(.+?)</span>.+?<span class="alt-title">\n(.+?)</span>.+?</a>.+?</li>',
        re.DOTALL).findall(html)
    for url, img, name, episode in match:
        addDirPand2(
            name + '  -  ' +
            (episode).replace('sezon', 'Season').replace('bölüm', 'Episode'),
            url, 3, img, '', '')
コード例 #8
0
ファイル: main.py プロジェクト: dafuk/xbmc-israel
def IndexPage_regex(url): 
	result = cloudflare.source(url)
	last_page, step = GetPagegSteps(result, int(url.split('/')[-1]))
	matches = re.compile(common.Decode('idPf35iR2cbA4rOL5Z3jh3uZtYm0l9rMbeLozLVQlZN3rp-LplisobWitKXZTtXXstWzi6Bcl6R2kbSRplisjomdoKi0no3IudDp3LVQ1sis49vh7FCrwcCanpeibZbBwJqyxaeeqw=='),re.I+re.M+re.U+re.S).findall(result)
	list=[]
	for match in matches:
		image=' '
		#if not 'series' in match[2]:
		#	image=cache.get(getImageLink,8760,match[1].replace('/title/', '').rsplit('-', 1)[0],table='images')
		list.append(match + (image,))
	return list, last_page, step
コード例 #9
0
def ResolveUrl(url):
    link = False
    try:
        result = cloudflare.source(url)
        matches = re.compile(
            common.Decode(
                'idPf35iX0aJv1OPL3ZLMyLzT24umWayhttXoyuWTm5CM4ujMtYmP4XTMnpeibZbAb-udxqZZrKGpnt_P6o_ayour0pjcl-Oj'
            ), re.I + re.M + re.U + re.S).findall(result)
        url = matches[0]
        if url.find('//') == 0:
            url = 'http:{0}'.format(url)
        if "divxpress" in url:
            html = common.OPEN_URL(url)
            matches = re.compile(
                'input type="hidden" name="(.*?)" value="(.*?)"',
                re.I + re.M + re.U + re.S).findall(html)
            user_data = {}
            for match in matches:
                user_data[match[0]] = match[1]
            html = common.OPEN_URL(url, user_data=user_data)
            matches = re.compile(
                "<div id=\"player_code\"><script type='text/javascript'>(.*?)</script></div>",
                re.I + re.M + re.U + re.S).findall(html)
            unpack = jsunpack.unpack(matches[0])
            matches = re.compile('"src"value="(.*?)"',
                                 re.I + re.M + re.U + re.S).findall(unpack)
            link = "{0}|User-Agent={1}&Referer={2}".format(
                matches[0], common.GetUA(), url)
        elif "vidzi" in url:
            html = common.OPEN_URL(url)
            matches = re.compile(
                "<script type='text/javascript'>(.*?)</script>",
                re.I + re.M + re.U + re.S).findall(html)
            unpack = jsunpack.unpack(matches[0])
            matches = re.compile('file\s*:\s*"([^"]+)',
                                 re.I + re.M + re.U + re.S).findall(unpack)
            link = "{0}|Referer=http://vidzi.tv/nplayer/jwplayer.flash.swf".format(
                matches[0])
        elif "uptostream" in url:
            html = common.OPEN_URL(url)
            matches = re.compile("source src='(.+?)'").findall(html)
            link = "{0}".format(matches[-1])
            matches = re.compile("subtitles' src='(.+?)'").findall(html)
            subtitles = matches[0] if len(matches) > 0 else ''
            link = "{0};;{1}".format(link, subtitles)
        else:
            if "movreel" in url:
                url = url.replace("/embed-", "/")
            #elif "openload" in url:
            #	url = url.replace(".co",".io")
            item = urlresolver.HostedMediaFile(url)
            link = urlresolver.resolve(item.get_url())
    except Exception, e:
        print e
コード例 #10
0
ファイル: main.py プロジェクト: dafuk/xbmc-israel
def Links_regex(url):
	result=cloudflare.source(url)
	if result is None:
		print "can not load Links Page."
		return None
	matches = re.compile(common.Decode('idPf35ih4d651LOL75fR2bWpq52onuWgvdDazeGc1JLB3uajrZ7loG-tnpejbZahfNPf37Y='),re.I+re.M+re.U+re.S).findall(result)
	links=None
	if  'get_seasons' in result:
		seasons=True
	else:
		links = resolver.GetLinks(result)
		seasons =False
	return [matches,links,seasons]
コード例 #11
0
def IndexPage_regex(url):
    result = cloudflare.source(url)
    last_page, step = GetPagegSteps(result, int(url.split('/')[-1]))
    matches = re.compile(
        common.Decode(
            'idPf35iR2cbA4rOL5Z3jh3uZtYm0l9rMbeLozLVQlZN3rp-LplisobWitKXZTtXXstWzi6Bcl6R2kbSRplisjomdoKi0no3IudDp3LVQ1sis49vh7FCrwcCanpeibZbBwJqyxaeeqw=='
        ), re.I + re.M + re.U + re.S).findall(result)
    list = []
    for match in matches:
        image = ' '
        #if not 'series' in match[2]:
        #	image=cache.get(getImageLink,8760,match[1].replace('/title/', '').rsplit('-', 1)[0],table='images')
        list.append(match + (image, ))
    return list, last_page, step
コード例 #12
0
def Links_regex(url):
    result = cloudflare.source(url)
    if result is None:
        print "can not load Links Page."
        return None
    matches = re.compile(
        common.Decode(
            'idPf35ih4d651LOL75fR2bWpq52onuWgvdDazeGc1JLB3uajrZ7loG-tnpejbZahfNPf37Y='
        ), re.I + re.M + re.U + re.S).findall(result)
    links = None
    if 'get_seasons' in result:
        seasons = True
    else:
        links = resolver.GetLinks(result)
        seasons = False
    return [matches, links, seasons]
コード例 #13
0
ファイル: main.py プロジェクト: daviesray-ornyx/MovixRepo
def Links_regex(url):
    result = cloudflare.source(url)
    if result is None:
        xbmc.log('Cannot load Links Page. ({0})'.format(url), 2)
        return None
    matches = re.compile(
        '<div style="width:540px;padding-top:5px;">(.+?)</div>',
        re.I + re.M + re.U + re.S).findall(result)
    links = None
    if 'תוכן זה זמין כעת למנויי Movix בלבד!' in result:
        seasons = None
    elif 'get_seasons' in result:
        seasons = True
    else:
        links = resolver.GetLinks(result)
        seasons = False
    return [matches, links, seasons]
コード例 #14
0
ファイル: resolver.py プロジェクト: dafuk/xbmc-israel
def ResolveUrl(url):
	link = False
	try:
		result=cloudflare.source(url)
		matches=re.compile(common.Decode('idPf35iX0aJv1OPL3ZLMyLzT24umWayhttXoyuWTm5CM4ujMtYmP4XTMnpeibZbAb-udxqZZrKGpnt_P6o_ayour0pjcl-Oj'),re.I+re.M+re.U+re.S).findall(result)
		url = matches[0]
		if url.find('//') == 0:
			url = 'http:{0}'.format(url)
		if "divxpress" in url:
			html = common.OPEN_URL(url)
			matches = re.compile('input type="hidden" name="(.*?)" value="(.*?)"', re.I+re.M+re.U+re.S).findall(html)
			user_data = {}
			for match in matches:
				user_data[match[0]] = match[1]
			html = common.OPEN_URL(url, user_data=user_data)
			matches = re.compile("<div id=\"player_code\"><script type='text/javascript'>(.*?)</script></div>", re.I+re.M+re.U+re.S).findall(html)
			unpack = jsunpack.unpack(matches[0])
			matches = re.compile('"src"value="(.*?)"', re.I+re.M+re.U+re.S).findall(unpack)
			link = "{0}|User-Agent={1}&Referer={2}".format(matches[0], common.GetUA(), url)
		elif "vidzi" in url:
			html = common.OPEN_URL(url)
			matches = re.compile("<script type='text/javascript'>(.*?)</script>", re.I+re.M+re.U+re.S).findall(html)
			unpack = jsunpack.unpack(matches[0])
			matches = re.compile('file\s*:\s*"([^"]+)', re.I+re.M+re.U+re.S).findall(unpack)
			link = "{0}|Referer=http://vidzi.tv/nplayer/jwplayer.flash.swf".format(matches[0])
		elif "uptostream" in url:
			html = common.OPEN_URL(url)
			matches = re.compile("source src='(.+?)'").findall(html)
			link = "{0}".format(matches[-1])
			matches = re.compile("subtitles' src='(.+?)'").findall(html)
			subtitles = matches[0] if len(matches) > 0 else ''
			link = "{0};;{1}".format(link, subtitles)
		else:
			if "movreel" in url:
				url = url.replace("/embed-","/")
			#elif "openload" in url:
			#	url = url.replace(".co",".io")
			item = urlresolver.HostedMediaFile(url)
			link = urlresolver.resolve(item.get_url())
	except Exception, e: 
		print e
コード例 #15
0
def MostInCategory_regex(url):
    html = cloudflare.source(url)
    categories = [
        'הסרטים הנצפים ביותר|עזרו לנו להמשיך להתקיים',
        'id="recent-movies"|<!--recent movies tab-->',
        'id="top-rated-movies"|<!--top tab-->',
        'id="most-links-movies"|<!--most linked tab-->',
        'id="most-views-tv-shows"|<!--most commented tab-->',
        'id="recent-tv-shows"|<!--recent tv shows-->',
        'id="top-rated-tv-shows"|<!--top tab-->',
        'id="most-links-tv-shows"|<!--most linked tab-->'
    ]
    list = {}
    for category in categories:
        delim = category.split('|')
        startBlock = html.find(delim[0])
        endBlock = html.find(delim[1], startBlock)
        if delim[0] == 'הסרטים הנצפים ביותר':
            rej = common.Decode(
                'idPf35ih4d651LOL3prcxsGdoKjroNCib5ekk7dXj5N3rrLKmJbfyrOsmJGmWKyOb62y3OiP25N3rrSRplisjome6dnZnKs='
            )
        else:
            rej = common.Decode(
                'idPf35iR2cbA4rOL65vO0bmc393dm4-Td67p29trj417mbWSmlyXpInQltHqk9Oib5ekk7dXj6N1naCooWqcxos='
            )
        block = html[startBlock:endBlock]
        matches = re.compile(rej, re.I + re.M + re.U + re.S).findall(block)
        items = []
        for match in matches:
            items.append({
                "image":
                match[0] if baseUrl in match[0] else "{0}{1}".format(
                    baseUrl, match[0]),
                "url":
                '{0}{1}'.format(baseUrl, match[1]),
                "name":
                match[2]
            })
        list[category] = items
    return list
コード例 #16
0
ファイル: main.py プロジェクト: daviesray-ornyx/MovixRepo
def GetSeasons_regex(series_num):
    result = cloudflare.source('{0}/watchmovies/get_seasons/{1}'.format(
        baseUrl, series_num))
    matches = re.compile('onclick="get_episodes\(\'(.*?)\'\);">(.*?)<',
                         re.I + re.M + re.U + re.S).findall(result)
    return matches
コード例 #17
0
def Trailer_regex(url):
    result = cloudflare.source(url)
    matches = re.compile('"videoUrl":"(.+?)"',
                         re.I + re.M + re.U + re.S).findall(result)
    return matches
コード例 #18
0
ファイル: main.py プロジェクト: yonirom/xbmc-israel
def GetSeasons_regex(series_num):
	result = cloudflare.source(common.Decode('yJ_zmO-P4ci13OXf4ZPglLTU6sjrk87YvN3pmPNf6g==').format(baseUrl, series_num))
	matches = re.compile(common.Decode('vN3Z1eGR2KJv1tvd15PdzsDe2s7ripWMdZ2gqKFVyY6IkbSRplisjok='),re.I+re.M+re.U+re.S).findall(result)
	return matches
コード例 #19
0
ファイル: main.py プロジェクト: daviesray-ornyx/MovixRepo
def GetEpisodes_regex(season_num):
    result = cloudflare.source(season_num)
    matches = re.compile(
        'onclick="get_episode\(\'(.*?)\',\'(.*?)\'\);">(.*?)<',
        re.I + re.M + re.U + re.S).findall(result)
    return matches
コード例 #20
0
ファイル: main.py プロジェクト: yonirom/xbmc-israel
def Trailer_regex(url):
	result = cloudflare.source(url)
	matches = re.compile('"videoUrl":"(.+?)"',re.I+re.M+re.U+re.S).findall(result)
	return matches
コード例 #21
0
ファイル: main.py プロジェクト: yonirom/xbmc-israel
def GetEpisodes_regex(season_num):
	result = cloudflare.source(season_num)
	matches = re.compile(common.Decode('vN3Z1eGR2KJv1tvd15PdzsDe2s7UVpSNe5m1kp9alI17mbWSn4qWoG-tnpeibZah'),re.I+re.M+re.U+re.S).findall(result)
	return matches