def LINK(name, murl, thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA("Yify", "Watched") stream_url = False ok = True infoLabels = main.GETMETAT(name, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } stream_url = main.resolve_url(murl) try: infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark from resources.universal import playbackengine if stream_url: main.CloseAllDialogs() player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'], season=season, episode=episode, year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(name + ' ' + '[COLOR green]Yify[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAYMEDIA(name,url): ok = True r = re.findall(r'(.+?)\[COLOR', name) name = r[0] r=re.findall('Season(.+?)Episode([^<]+)',name) if r: infoLabels =main.GETMETAEpiT(name,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(name,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } try: stream_url = urlresolver.resolve(url) infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(hname+' '+'[COLOR=FF67cc33]TvRelease[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False) player.KeepAlive() return ok except: return ok
def LINKSP5(mname, url): main.GA("Noobroom", "Watched") ok = True try: mname = mname.replace('[COLOR red]', '').replace('[/COLOR]', '') xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Opening Link,9000)") stream_url = find_noobroom_video_url(url) infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR=FF67cc33]Starplay[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: main.ErrorReport(e) return ok
def PLAYLINK(mname, murl): name = main.removeColoredText(mname) main.GA("IceFilms", "Watched") ok = True infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] murl = resolveIceLink(murl) infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(murl) infoL = { 'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=name, season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]IceFilms[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKFS(name,murl): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA("SokroStream","Watched") stream_url = False ok=True infoLabels =main.GETMETAT(name,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } if 'frenchstream'in murl: murl=GetLink(murl) stream_url = main.resolve_url(murl) print stream_url try: listitem = xbmcgui.ListItem(thumbnailImage=img) listitem.setInfo('video', {'Title': name, 'Year': ''} ) infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(name+' '+'[COLOR green]SokroStream[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKINT(mname, url): main.GA("Einthusan", "Watched") ok = True MainUrl = "http://www.einthusan.com/movies/" link = main.OPENURL(url) try: match = re.compile("'hd-2': { 'file': '(.+?)'").findall(link) thumb = re.compile('<img src="(../images.+?)"').findall(link) infoLabels = main.GETMETAT(mname, '', '', thumb[0]) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } desc = ' ' for stream_url in match: continue infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'], season=season, episode=episode, year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]Einthusan[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=MainUrl + thumb[0], fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK(name,murl,thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA(prettyName,"Watched") stream_url = False ok=True infoLabels =main.GETMETAT(name,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(murl) keys=re.findall('(?sim)vkey=(.+?)&',link) if keys: vurl='http://www.pinit.tv/embedplayer.php?width=620&height=465&vkey='+keys[0]+'&autoplay=true&subtitles=' link=main.OPENURL(vurl) key=re.findall('href="(rtmp://[^"]+?)">Play',link) stream_url = key[0] id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0] else: urllist=[] epiList=[] match=re.findall('(?sim)<a href="([^"]+?)" target="_blank">([^<]+?)</a>',link) for url,epi in match: urllist.append(url) epiList.append(epi) dialog = xbmcgui.Dialog() ret = dialog.select('[COLOR=FF67cc33][B]Select Episode[/COLOR][/B]',epiList) if ret == -1: return link2=main.OPENURL(urllist[ret]) key=re.findall('href="(rtmp[^"]+?)">Play',link2) stream_url = key[0] id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0] name=epiList[ret] try: infoL={'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']} # play with bookmark from resources.universal import playbackengine if stream_url: main.CloseAllDialogs() player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) player.setSubtitles('http://www.pinit.tv/subs/'+id+'.srt') #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(name+' '+'[COLOR green]'+prettyName+'[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKFMA(mname,murl,thumb,desc): main.GA("FMA","Watched") sources = [] ok=True playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)") infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<span class=\'.+?\'>(.+?)</span></p><div class=\'.+?\'><img src=\'.+?\' /></div><a class=\'.+?\' href="(.+?)"').findall(link) import urlresolver for host, url in match: durl='http://www.freemoviesaddict.com/'+url redirect=main.REDIRECT(durl) hosted_media = urlresolver.HostedMediaFile(url=redirect, title=host) sources.append(hosted_media) if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) if source != False: try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname+' '+'[COLOR green]FMA[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAY(name, url): ok = True hname = name name = name.split('[COLOR blue]')[0] name = name.split('[COLOR red]')[0] infoLabels = main.GETMETAT(name, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = urlresolver.resolve(url) infoL = { 'Title': infoLabels['metaName'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAY(mname,murl,thumb): main.GA("Dramania","Watched") ok=True r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } try : xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName']) from resources.universal import playbackengine if "'," in murl: mname=main.removeColoredText(mname) pl=xbmc.PlayList(1);pl.clear() playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0]) for xname,link in playlist: pl.add(getLink(link),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img)) xbmc.Player().play(pl) while xbmc.Player().isPlaying(): xbmc.sleep(2500) else: stream_url = getLink(murl) # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname+' '+'[COLOR green]Dramania[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKS(mname,url): ok=True hname=mname hname=hname.split(' online')[0] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") r=re.findall('Season(.+?)Episode([^<]+)',mname) if r: mname=mname.split(' [COLOR blue]')[0] infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: mname=mname.split(' [COLOR blue]')[0] infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } r=re.findall('xoxv(.+?)xoxe(.+?)xoxc',url) import urlresolver for hoster, url in r: source = urlresolver.HostedMediaFile(host=hoster, media_id=url) try : xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import playbackengine, watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(hname+' '+'[COLOR=FF67cc33]TubePlus[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK (mname,murl,thumb): main.GA("MkvMovies","Watched") sources = [] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)") link=main.OPENURL(murl) ok=True infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } match=re.compile('<a href="([^<]+)" rel="nofollow">Click Here to Download</a>').findall(link) for url in match: match2=re.compile('http://(.+?)/.+?').findall(url) for host in match2: host = host.replace('www.','') match3=re.compile('rar').findall(url) if len(match3)==0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = source.resolve() else: stream_url = False return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]MkvMovies[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def iWatchLINKB(mname,url): main.GA("iWatchonline","Watched") ok=True hname=mname xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") mname=mname.split(' [COLOR red]')[0] r=re.findall('Season(.+?)Episode([^<]+)',mname) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(url) link=main.unescapes(link) match=re.compile('<(?:iframe|pagespeed_iframe).+?src=\"(.+?)\"').findall(link) hosted_media = urlresolver.HostedMediaFile(match[0]) source=hosted_media try : if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(hname+' '+'[COLOR green]iWatchonline[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK2(mname,murl,thumb,desc): SRT=os.path.join(datapath,'Sub.srt') if os.path.exists(SRT): os.remove(SRT) ok=True infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } main.GA("SominalTv","Watched") if murl: if "'," in murl: print murl mname=main.removeColoredText(mname) pl=xbmc.PlayList(1);pl.clear() playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0]) for xname,link in playlist: pl.add(getvideo2(link,answer='x11g'),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img)) xbmc.Player().play(pl) xbmc.Player().setSubtitles(SRT) while xbmc.Player().isPlaying(): xbmc.sleep(2500) if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]SominalFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) else: stream_url2=getvideo2(murl) xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url2, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) player.setSubtitles(SRT)#inserts Srt file from profile folder #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]SominalFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok else: xbmc.executebuiltin("XBMC.Notification(Sorry!,Protected Link,5000)")
def MLink(mname,suburl,thumb): main.GA(mname,"Watched") i=1 namelist=[] urllist=[] ok=True infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } suburl=main.unescapes(suburl) match=re.compile('<sublink>(.+?)</sublink><host>(.+?)</host>').findall(suburl) for url,host in match: namelist.append(host.upper()) urllist.append(url) dialog = xbmcgui.Dialog() answer =dialog.select("Pick Host", namelist) if answer != -1: murl=urllist[int(answer)] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)") else: return try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(murl) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]VIPlaylist[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSP2B(mname,murl): main.GA("Newmyvideolinks","Watched") ok=True r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() hosted_media = urlresolver.HostedMediaFile(murl) source = hosted_media try : if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]NewmyVideoLink[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSP3(mname,murl): main.GA("FilesTube","Watched") msg = xbmcgui.DialogProgress() msg.create('Please Wait!','') msg.update(0,'Collecting hosts') link=main.OPENURL(murl,mobile=True,timeout = 10) sources=[] titles=[] ok=True match=re.compile('(?sim)<pre><span id="copy_paste_links">[^<]+?<').findall(link) if match: match = re.compile('(https?://[^<]+)').findall(match[0]) hostsmax = len(match) h = 0 from urlparse import urlparse for url in match: url = url.strip() h += 1 percent = (h * 100)/hostsmax msg.update(percent,'Collecting hosts - ' + str(percent) + '%') if msg.iscanceled(): break vlink=re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url) if len(vlink)==0: host = urlparse(url).hostname.replace('www.','').partition('.')[0] hostname = host host = host.upper() quality = mname match3=re.compile('(?i)(720p?|1080p?)').findall(quality) if match3 and not 'p' in match3[0]: match3[0] += 'p' match4=re.compile('mp4').findall(url) if len(match3)>0: host =host+' [COLOR red]'+match3[0]+'[/COLOR]' elif len(match4)>0: host =host+' [COLOR green]SD MP4[/COLOR]' else: host =host+' [COLOR blue]SD[/COLOR]' if main.supportedHost(hostname): titles.append(host) sources.append(url) msg.close() if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Could not find a playable link,3000)") return else: dialog = xbmcgui.Dialog() index = dialog.select('Choose your stream', titles) if index != -1: source = sources[index] else: source = None try: if not source: main.CloseAllDialogs() return xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = main.resolve_url(source) if(stream_url == False): return if re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I): mname=mname.split('&')[0] infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']} if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName']) # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname+' '+'[COLOR green]DL4Free[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKSEXTRA(mname, murl, thumb, desc): main.GA("Extramina", "Watched") sources = [] link = main.OPENURL(murl) ok = True infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting hosts,5000)") match = re.compile( '<div class="streamlink"><a target=".+?" href="(.+?)">(.+?)</a></div>' ).findall(link) for url, host in match: match3 = re.compile('extraminamovies').findall(url) if len(match3) > 0: link2 = main.OPENURL(url) match = re.compile('<iframe src="(.+?)"').findall(link2) if len(match) == 0: match = re.compile('src="(.+?)"').findall(link2) for url in match: match2 = re.compile('http://(.+?)/.+?').findall(url) for host in match2: host = host.replace('www.', '') if host == 'putlocker.com': url = url.replace('embed', 'file') hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: stream_url = source.resolve() else: stream_url = False return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]Extramina[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKSEXTRA(mname, murl, thumb, desc): main.GA("Watching Now", "Watched") xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting hosts,5000)") sources = [] link = main.OPENURL(murl) ok = True infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } match = re.compile('<strong><a href="(.+?)" target=".+?">(.+?)</a>', re.DOTALL).findall(link) import urlresolver for url, host in match: link2 = getlink(murl, url) xurl = re.findall('var click_url = "(.+?)";', link2)[0] hosted_media = urlresolver.HostedMediaFile(url=xurl, title=host) sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if (stream_url == False): return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]Watching Now[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK2(mname, murl, thumb, desc): ok = True namelist = [] urllist = [] infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } link2 = main.OPENURL(murl) SRT = os.path.join(datapath, 'Sub.srt') if os.path.exists(SRT): os.remove(SRT) link2 = link2.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') docUrl = re.compile('iframe src="(.+?)"').findall(link2) if len(docUrl) == 0: link3 = dekode(link2) try: docUrl = re.compile('iframe src="(.+?)"').findall(link3) except: youtube = re.compile( '<iframe width=".+?" height=".+?" src="http://www.youtube.com/embed/(.+?)" scrolling=".+?"' ).findall(link2) url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + youtube[ 0] + "&hd=1" stream_url = url # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname, season='', episode='', year='', img=thumb, infolabels='', watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]SominalFilms[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok if docUrl: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Links,3000)") link2 = main.OPENURL(docUrl[0]) link2 = link2.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('\/', '/').replace('\\', '') match = re.compile('url_encoded_fmt_stream_map\":\"(.+?),\"').findall( link2) if match: subtitle_url_start = re.compile("\"ttsurl\":\"(.+?)\"").findall( link2) v_add = re.compile("id=(.+?)&").findall(subtitle_url_start[0]) subtitle_url_start = subtitle_url_start[0] + '&v=' + v_add[0] subtitle_url_start = subtitle_url_start + '&name=(www.SominalTvFilms.com)&lang=en&hl=e&format=1&type=track&kind' print "Subtitle File=" + str(subtitle_url_start) #Converts Xml file to SRT file try: link = main.OPENURL(subtitle_url_start) link = link.replace('\r', '').replace('\n', '').replace( '\t', '').replace(' ', '').replace('<text start="0">', '') except: link = '' submatch = re.compile( '<text start="(.+?)" dur="(.+?)">(.+?)</text>').findall(link) if submatch: i = 1 for start, dur, text in submatch: #Converts seconds to HH:MM:SS,MS format for srt file text = text.replace(''', "'").replace( '"', '"').replace('&', "&").replace( "'", "'").replace('<i>', '').replace( "#8211;", "-").replace('</i>', '').replace( "’", "'").replace('&quot;', '"').replace( '×', '').replace('&', '').replace( '‘', '').replace('–', '').replace( '“', '').replace( '”', '').replace('—', '') dur = Decimal(start) + Decimal(dur) dur = str(dur) if (float(start) % 1 != 0): start1 = start.split('.')[0] start2 = start.split('.')[1] else: start1 = start start2 = 0 start = time.strftime('%H:%M:%S', time.gmtime(float(start1))) if (float(dur) % 1 != 0): dur1 = dur.split('.')[0] dur2 = dur.split('.')[1] else: dur1 = dur dur2 = 0 dur = time.strftime('%H:%M:%S', time.gmtime(float(dur1))) #creating srt file and saving it on mashup profile folder open(SRT, 'a').write(""" """ + str(i) + """ """ + str(start) + "," + str(start2) + " --> " + str(dur) + "," + str(dur2) + """ """ + text + """ """) i = i + 1 streams_map = str(match) stream = re.compile('url=(.+?)&type=.+?&quality=(.+?)[,\"]{1}' ).findall(streams_map) for group1, group2 in stream: #Thanks to the-one for google-doc resolver stream_url = str(group1) stream_url = main.unescapes(stream_url) urllist.append(stream_url) stream_qlty = str(group2.upper()) if (stream_qlty == 'HD720'): stream_qlty = 'HD-720p' elif (stream_qlty == 'LARGE'): stream_qlty = 'SD-480p' elif (stream_qlty == 'MEDIUM'): stream_qlty = 'SD-360p' namelist.append(stream_qlty) dialog = xbmcgui.Dialog() answer = dialog.select("Quality Select", namelist) if answer != -1: main.GA("SominalTv", "Watched") xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Opening Link,3000)") stream_url2 = urllist[int(answer)] infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) player.setSubtitles(SRT) #inserts Srt file from profile folder main.GA("SominalTv", "Watched") #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]SominalFilms[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok else: xbmc.executebuiltin("XBMC.Notification(Sorry!,Protected Link,5000)")
def MLink2(mname, murl, thumb, muvideo=False): main.GA(mname, "Watched") ok = True xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") if not muvideo: match = re.compile('<referer>(.+?)</referer>').findall(murl) if match: video = match[0] else: video = murl infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: stream_url = refererResolver(video) if stream_url == False: return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]VIPlaylist[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSP3(mname, url): main.GA("Dailyfix", "Watched") sources = [] ok = True xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Hosts,8000)") infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } link = main.OPENURL(url) match = re.compile( "<a href='(.+?)' class='.+?' title='.+?' rel='.+?'>.+?</a").findall( link) import urlresolver main.CloseAllDialogs() for murl in match: host = re.compile("http://(.+?)\.[^/]+?/.+?").findall(murl) for hname in host: hname = hname.replace('www.', '').title() hosted_media = urlresolver.HostedMediaFile(url=murl, title="[COLOR blue]" + hname + "[/COLOR]") sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Movie doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Actual HD Movie Requires Buffer Time,7000)" ) stream_url = main.resolve_url(source.get_url()) else: stream_url = False return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]DailyFix[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def MLink(mname, murl, thumb): main.GA(mname, "Watched") ok = True xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)") infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } hosted_media = urlresolver.HostedMediaFile(url=murl) try: if re.findall('billionuploads', murl, re.I): try: stream_url = main.resolve_billionuploads(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return elif re.findall('180upload', murl, re.I): try: stream_url = main.resolve_180upload(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return elif re.findall('veehd', murl, re.I): try: stream_url = main.resolve_veehd(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return elif re.findall('vidto', murl, re.I): try: stream_url = main.resolve_videto(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return elif re.findall('epicshare', murl, re.I): try: stream_url = main.resolve_epicshare(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return elif re.findall('lemuploads', murl, re.I): try: stream_url = main.resolve_lemupload(murl) except: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)" ) stream_url = source.resolve() else: stream_url = False return else: if hosted_media: source = hosted_media if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = source.resolve() else: stream_url = False return else: stream_url = murl infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark stream_url = stream_url.replace(' ', '%20') player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]VIPlaylist[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAY(mname, murl, thumb): main.GA("MBox", "Watched") stream_url = resolveMBLink(murl) r = re.findall('(.+?)\sSeason\s(\d+)\sEpisode\s(\d+)', mname, re.I) if r: infoLabels = main.GETMETAEpiT(mname, '', '') video_type = 'episode' season = infoLabels['season'] episode = infoLabels['episode'] else: infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: if stream_url == False: return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]MBOX[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return True except Exception, e: if stream_url != False: main.ErrorReport(e) return False
def LINKINT3(name, murl, thumb): sources = [] main.GA("Cinevip", "Watched") xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Hosts,3000)") link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') ok = True infoLabels = main.GETMETAT(name, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } match = re.compile( 'class=".+?">([^<]+)</span></td><td>([^<]+)</td><td>([^<]+)</td>.+?adf.ly/.+?/(.+?)"' ).findall(link) if len(match) == 0: match = re.compile( '<td><span class=".+?">.+?</span></td><td><span class=".+?">(.+?)</span></td><td>(.+?)</td><td>(.+?)</td>.+?<a .+?href=(.+?)>.+?</a>' ).findall(link) for host, lang, qua, url in match: print url url = url.replace('target="_blank"', '').replace('"', '') hosted_media = urlresolver.HostedMediaFile( url=url, title=host + ' [COLOR red]' + lang + '[/COLOR] ' + qua) sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False return listitem = xbmcgui.ListItem(thumbnailImage=thumb) listitem.setInfo('video', {'Title': name, 'Year': ''}) infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'], season=season, episode=episode, year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(name + ' ' + '[COLOR green]Cinevip[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKST2(mname, murl, thumb): sources = [] main.GA("Movie1k", "Watched") xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Hosts,10000)") f = re.findall('(.+?) Season (.+?) Episode ([^<]+)', mname, re.I) if f: infoLabels = main.GETMETAEpiT(mname, thumb, '') video_type = 'episode' season = infoLabels['season'] episode = infoLabels['episode'] if len(f) == 0: infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('<td>', '<td >') ok = True match = re.compile( '<td >.+?</td><td >([^"]*)</td><td.+?><a.+?href="http://www.movie1k.ag/watch.php[?]idl=(.+?)" target', re.DOTALL).findall(link) for host, url in match: print "im in" if 'movie1k' in url: matchx = re.compile('movie1k').findall(url) if len(matchx) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) match3 = re.compile('movie1k').findall(url) if len(match3) > 0: link2 = main.OPENURL(url) link2 = link2.replace('\r', '').replace('\n', '').replace( '\t', '').replace(' ', '') match4 = re.compile('<iframe.+?src="(.+?)"').findall(link2) if len(match4) == 0: match4 = re.compile('<IFRAME SRC="(.+?)"').findall(link2) if len(match4) == 0: match4 = re.compile("src='(.+?)'").findall(link2) for url in match4: matchx = re.compile('movie1k').findall(url) if len(matchx) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) else: matchx = re.compile('movie1k').findall(url) if len(matchx) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) match2 = re.compile( '<td >.+?</td><td >(.+?)</td><td ><a.+?href="http://www.linkembed.net/watch.php[?]idl=(.+?)" target', re.DOTALL).findall(link) for host, url in match2: print "im in" if 'linkembed' in url: matchxa = re.compile('linkembed').findall(url) if len(matchxa) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) match3a = re.compile('linkembed').findall(url) if len(match3a) > 0: link2 = main.OPENURL(url) link2 = link2.replace('\r', '').replace('\n', '').replace( '\t', '').replace(' ', '') match4a = re.compile('<iframe.+?src="(.+?)"').findall(link2) if len(match4a) == 0: match4a = re.compile('<IFRAME SRC="(.+?)"').findall(link2) if len(match4a) == 0: match4a = re.compile("src='(.+?)'").findall(link2) for url in match4a: matchx = re.compile('linkembed').findall(url) if len(matchxa) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) else: matchxb = re.compile('linkembed').findall(url) if len(matchxb) == 0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) try: if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)" ) else: source = urlresolver.choose_source(sources) xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if (stream_url == False): return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]Movie1k[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSP3(mname, murl): main.GA("DL4Free", "Watched") msg = xbmcgui.DialogProgress() msg.create('Please Wait!', '') msg.update(0, 'Collecting hosts') link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('&', '&') sources = [] titles = [] ok = True match0 = re.compile( '(?sim)<div class="meta">Download Links</div>.*?</div>').findall(link) match1 = [] match2 = [] if match0: match2 = re.compile('(?sim)<p.*?</p>').findall(match0[0]) for paragraph in reversed(match2): match1 += re.compile('<a href="([^"]+?)"').findall(paragraph) match = [] paragraphs = re.compile('(?sim)<code>.+?</code>').findall(link) for paragraph in paragraphs: domains = re.compile('https?://([^"]+?)/[^<^\]]+').findall(paragraph) urls = re.compile('(https?://[^"]+?/[^<^\]]+)').findall(paragraph) for d in domains: if domains.count(d) > 1: while d in domains: index = domains.index(d) domains.pop(index) urls.pop(index) match += urls # match=re.compile('<a href="([^<]+)">htt').findall(link) match = match1 + match mainlinks = len(match1) numpar = len(match2) hostsmax = len(match) h = 0 from urlparse import urlparse for url in match: h += 1 percent = (h * 100) / hostsmax msg.update(percent, 'Collecting hosts - ' + str(percent) + '%') if msg.iscanceled(): break vlink = re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url) if len(vlink) == 0: firstword = mname.partition(' ')[0] if re.search('(?i)' + mname.partition(' ')[0], url): if re.search('(?i)1080p?', mname): if not re.search('(?i)1080p?', url): continue if re.search('(?i)720p', mname): if not re.search('(?i)720p?', url): continue if re.search('(?i)1080p?', mname): if re.search('(?i)720p|dvdrip|480p/|xvid', url): continue if re.search('(?i)720p?', mname): if re.search('(?i)1080p?|dvdrip|480p|xvid', url): continue if re.search('(?i)xvid|480p', mname) or not re.search('(?i)1080p?|720p?', mname): if re.search('(?i)1080p?|720p?', url): continue # url = url.replace('ul.to','uploaded.net') host = urlparse(url).hostname.replace('www.', '').partition('.')[0] hostname = host host = host.upper() if h <= mainlinks and numpar == 1: quality = mname else: quality = url match3 = re.compile('(?i)(720p?|1080p?)').findall(quality) if match3 and not 'p' in match3[0]: match3[0] += 'p' match4 = re.compile('mp4').findall(url) if len(match3) > 0: host = host + ' [COLOR red]' + match3[0] + '[/COLOR]' elif len(match4) > 0: host = host + ' [COLOR green]SD MP4[/COLOR]' else: host = host + ' [COLOR blue]SD[/COLOR]' if main.supportedHost(hostname): titles.append(host) sources.append(url) msg.close() if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Could not find a playable link,3000)") return else: dialog = xbmcgui.Dialog() index = dialog.select('Choose your stream', titles) if index != -1: source = sources[index] else: source = None try: if not source: main.CloseAllDialogs() return xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = main.resolve_url(source) if (stream_url == False): return if re.findall('(.+?)\ss(\d+)e(\d+)\s', mname, re.I): mname = mname.split('&')[0] infoLabels = main.GETMETAEpiT(mname, '', '') video_type = 'episode' season = infoLabels['season'] episode = infoLabels['episode'] else: infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } if not video_type is 'episode': infoL['originalTitle'] = main.removeColoredText( infoLabels['metaName']) # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]DL4Free[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKSSCENE(mname, murl, thumb): main.GA(prettyName, "Watched") msg = xbmcgui.DialogProgress() msg.create('Please Wait!', '') msg.update(0, 'Collecting hosts') link = main.OPENURL(murl) sources = [] titles = [] ok = True playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() paragraphs = re.compile('(?sim)<p.*?</p>').findall(link) match = [] for paragraph in paragraphs: domains = re.compile( '<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)" rel="nofollow">htt' ).findall(paragraph) urls = re.compile( '<a href="([^"]+)(?!jpg|gif|jpeg|png)" rel="nofollow">htt' ).findall(paragraph) for d in domains: if domains.count(d) > 1: while d in domains: index = domains.index(d) domains.pop(index) urls.pop(index) match += urls hostsmax = len(match) h = 0 from urlparse import urlparse for url in match: h += 1 percent = (h * 100) / hostsmax msg.update(percent, 'Collecting hosts - ' + str(percent) + '%') if msg.iscanceled(): break vlink = re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url) if len(vlink) == 0: url = re.sub('(?i)\.html$', '', url) filename = re.compile('(?i)/([^/]*?\..{3,4})$').findall(url) if filename: filename = " [" + filename[0] + "]" else: filename = "" firstword = mname.partition(' ')[0] if re.search('(?i)' + mname.partition(' ')[0], url): if re.search('(?i)1080p?', mname): if not re.search('(?i)1080p?', url): continue if re.search('(?i)720p', mname): if not re.search('(?i)720p?', url): continue if re.search('(?i)lumfile.com|freakshare.com', url): if not re.search('(?i)' + mname.partition(' ')[0], url): continue if re.search('(?i)1080p?', mname): if re.search('(?i)720p|dvdrip|480p/|xvid', url): continue if re.search('(?i)720p?', mname): if re.search('(?i)1080p?|dvdrip|480p|xvid', url): continue if re.search('(?i)xvid|480p', mname) or not re.search('(?i)1080p?|720p?', mname): if re.search('(?i)1080p?|720p?', url): continue # url = url.replace('ul.to','uploaded.net') host = urlparse(url).hostname.replace('www.', '').partition('.')[0] hostname = host host = host.upper() quality = url match3 = re.compile('(?i)(720p?|1080p?)').findall(quality) if match3 and not 'p' in match3[0]: match3[0] += 'p' match4 = re.compile('mp4').findall(url) if len(match3) > 0: host = host + ' [COLOR red]' + match3[0] + '[/COLOR]' elif len(match4) > 0: host = host + ' [COLOR green]SD MP4[/COLOR]' else: host = host + ' [COLOR blue]SD[/COLOR]' if main.supportedHost(hostname): titles.append(host + filename) sources.append(url) msg.close() if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Could not find a playable link,3000)") return else: dialog = xbmcgui.Dialog() index = dialog.select('Choose your stream', titles) if index != -1: source = sources[index] else: source = None try: if not source: main.CloseAllDialogs() return xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = main.resolve_url(source) if (stream_url == False): return if re.findall('(.+?)\ss(\d+)e(\d+)\s', mname, re.I): mname = mname.split('&')[0] infoLabels = main.GETMETAEpiT(mname, thumb, '') video_type = 'episode' season = infoLabels['season'] episode = infoLabels['episode'] else: infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } if not video_type is 'episode': infoL['originalTitle'] = main.removeColoredText( infoLabels['metaName']) # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]' + prettyName + '[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSAFLAM(mname, murl, thumb): main.GA("Aflam1", "Watched") if 'car-auto' not in murl: link = aflamOPENURL(murl) match = re.compile( '<a class="btn default large text-right" href="(.+?)"', re.DOTALL).findall(link) if match: murl = match[0] murl = murl.replace(' ', '') xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") print murl link = aflamOPENURL(murl) ok = True infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } match = re.compile("""<div id="Layer2".+?<iframe src='(.+?)'""", re.DOTALL).findall(link) if not match: match = re.compile('<div id="Layer2".+?<iframe src="(.+?)"', re.DOTALL).findall(link) if 'mail.ru' in match[0]: stream_url = get_mailru(match[0]) else: stream_url = main.resolve_url(match[0]) try: if stream_url == False: return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]Aflam1[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return True except Exception, e: if stream_url != False: main.ErrorReport(e) return False
def LINKSP3(mname, murl): main.GA("Rls1Click", "Watched") msg = xbmcgui.DialogProgress() msg.create('Please Wait!', '') msg.update(0, 'Collecting hosts') link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('&', '&') sources = [] titles = [] urls = [] ok = True paragraphs = re.compile( '(?sim)<strong>1-Click</strong>.*?<strong>1GB Links</strong>').findall( link) for paragraph in paragraphs: urls = re.compile('href="(https?://[^<^\]^"]+)"').findall(paragraph) # match=re.compile('<a href="([^<]+)">htt').findall(link) # match = match1 + match print urls hostsmax = len(urls) h = 0 from urlparse import urlparse for url in urls: h += 1 percent = (h * 100) / hostsmax msg.update(percent, 'Collecting hosts - ' + str(percent) + '%') if msg.iscanceled(): break if '1fichier' in url: host = '1fichier' else: host = urlparse(url).hostname.replace('www.', '').partition('.')[0] hostname = host host = host.upper() if main.supportedHost(hostname): titles.append(host + ' [COLOR red]1080P[/COLOR]') sources.append(url) msg.close() if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Could not find a playable link,3000)") return else: dialog = xbmcgui.Dialog() index = dialog.select('Choose your stream', titles) if index != -1: source = sources[index] else: source = None try: if not source: main.CloseAllDialogs() return xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = main.resolve_url(source) if (stream_url == False): return if re.findall('(.+?)\ss(\d+)e(\d+)\s', mname, re.I): mname = mname.split('&')[0] infoLabels = main.GETMETAEpiT(mname, '', '') video_type = 'episode' season = infoLabels['season'] episode = infoLabels['episode'] else: infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } if not video_type is 'episode': infoL['originalTitle'] = main.removeColoredText( infoLabels['metaName']) # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]DL4Free[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok