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
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
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
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)
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
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
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, '', '')
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
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
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]
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
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]
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]
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
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
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
def Trailer_regex(url): result = cloudflare.source(url) matches = re.compile('"videoUrl":"(.+?)"', re.I + re.M + re.U + re.S).findall(result) return matches
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
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
def Trailer_regex(url): result = cloudflare.source(url) matches = re.compile('"videoUrl":"(.+?)"',re.I+re.M+re.U+re.S).findall(result) return matches
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