Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib,urllib2,re
- import xbmcplugin,xbmcgui
- import xbmcaddon,xbmc
- import urlresolver
- #proxer.me addon by deboy1337
- pluginhandle = int(sys.argv[1])
- def CATEGORIES():
- addDir('Serien','http://proxer.me/anime?set=serie#top',1,'')
- addDir('Filme','http://proxer.me/anime?set=movie#top',1,'')
- addDir('OVA','http://proxer.me/anime?set=ova#top',1,'')
- addDir('Top-Bewertungen','http://proxer.me/anime/animeseries/rating/all#top',2,'')
- addDir('Top-Zugriffe','http://proxer.me/anime/animeseries/clicks/all#top',2,'')
- addDir('Airing-Anime','http://proxer.me/anime/airing#top',2,'')
- addDir('HD-Streams','http://proxer.me/misc/hdstream#top',2,'')
- addDir('Seasons','http://proxer.me/season#top',3,'')
- addDir('Suche','http://proxer.me/search?s=search&name=',5,'')
- def ALPHABET(url):
- html = getUrl(url)
- abc=re.compile('<td colspan="2">(.*?)</td>', re.DOTALL).findall(html)
- match=re.compile('<a data-ajax="true" class="menu" href="/anime/(.+?)">(.+?)</a>').findall(abc[0])
- for url,name in match:
- addDir(name,'http://proxer.me/anime/'+url,2,'')
- def ANIME(url):
- html = getUrl(url)
- match=re.compile('<a data-ajax="true" class="tip" title="Cover:(.+?)" href="(.+?)#top".*?>(.+?)</a>').findall(html)
- for img,url,name in match:
- addDir(name,'http://proxer.me'+url+'/list',9,'http://upload.proxer.me/cover/'+ img + '.jpg')
- try:
- next=re.compile('<td align="right">(.*?)</td>', re.DOTALL).findall(html)
- match2=re.compile('<a class="menu" data-ajax="true" href="(.+?)">(.+?)</a>').findall(next[0])
- for url,name in match2:
- if '>' in name:
- addDir('Weiter','http://proxer.me'+url,2,'')
- else:
- pass
- except:
- pass
- def SEASON(url):
- html = getUrl(url)
- match=re.compile('<a href="/info/(.+?)#top" data-ajax="true">(.+?)</a>').findall(html)
- for url,name in match:
- if 'Details' in name:
- html2 = getUrl('http://proxer.me/info/' + url + '#top')
- match2=re.compile('<span class="fn">(.+?)</span>').findall(html2)
- cover=re.compile('<img src="(.+?)" style="width:.+?; height:.+?;">').findall(html2)
- addDir(match2[0],'http://proxer.me/info/'+url+'/list',9,cover[0])
- print url
- def SUFU(url):
- kb = xbmc.Keyboard('', 'Suche', False)
- kb.doModal()
- search_entered = kb.getText().replace(' ','+')
- url2 = url + search_entered + '&sprache=alle&typ=all-anime&genre=&nogenre=&sort=name&length=&length-limit=down#search'
- html = getUrl(url2)
- match=re.compile('<td><a data-ajax="true" class="tip" title="Cover:(.+?)" href="(.+?)#top">(.+?)</a></td>').findall(html)
- for img,url,name in match:
- addDir(name,'http://proxer.me'+url+'/list',9,'http://upload.proxer.me/cover/'+ img + '.jpg')
- match2=re.compile('<a class="menu" data-ajax="true" href="(.+?)">(.+?)</a>').findall(html)
- for url,name in match2:
- if '>' in name:
- addDir(name,'http://proxer.me'+url,4,'')
- else:
- pass
- def SELECTSUB(url):
- html = getUrl(url)
- match=re.findall('<li class="active"><a data-ajax="true" href="/info/(.+?)/list#top">(.+?)</a>', html, re.DOTALL)
- for url,name in match:
- addDir(name + ' - Ger Sub','http://proxer.me/info/'+url+'/list#top',10,'')
- for url,name in match:
- addDir(name + ' - Eng Sub','http://proxer.me/info/'+url+'/list#top',11,'')
- def GERSUB(url):
- html = getUrl(url)
- match=re.compile('<td><span id="listTitle(.+?)">(.+?)</span></td>').findall(html)
- animeid=re.compile('<li class="active"><a data-ajax="true" href="/info/(.+?)/list#top">Episoden</a></li>').findall(html)
- for url,name in match:
- addDir(name,'http://proxer.me/watch/'+ animeid[0] +'/'+url+'/gersub',12,'')
- try:
- pages=re.compile('<p align="center">(.*?)</p>').findall(html)
- match2=re.compile('<a class="menu" data-ajax="true" href="/info/(.+?)">(.+?)</a>').findall(pages[0])
- for url,name in match2:
- addDir(name,'http://proxer.me/info/' + url ,10,'')
- except:
- pass
- def ENGSUB(url):
- html = getUrl(url)
- match=re.compile('<td><span id="listTitle(.+?)">(.+?)</span></td>').findall(html)
- animeid=re.compile('<li class="active"><a data-ajax="true" href="/info/(.+?)/list#top">Episoden</a></li>').findall(html)
- for url,name in match:
- addDir(name,'http://proxer.me/watch/'+ animeid[0] +'/'+url+'/engsub',12,'')
- try:
- pages=re.compile('<p align="center">(.*?)</p>').findall(html)
- match2=re.compile('<a class="menu" data-ajax="true" href="/info/(.+?)">(.+?)</a>').findall(pages[0])
- for url,name in match2:
- addDir(name,'http://proxer.me/info/' + url ,11,'')
- except:
- pass
- def GETHOST(url):
- html = getUrl(url)
- match=re.findall('"code":"(.+?)","type":"(.+?)","htype":".+?","replace":".+?embed.+?",', html, re.DOTALL)
- for url,name in match:
- if 'putlocker' in name:
- addDir(name,'http://putlocker.com/embed/' + url,13,'')
- elif 'streamcloud' in name :
- url = url.replace('\\','')
- addDir(name,url,13,'')
- elif 'sockshare' in name :
- addDir(name,'http://www.sockshare.com/embed/' + url,13,'')
- elif 'dailymotion' in name :
- addDir(name,'http://www.dailymotion.com/embed/video/' + url,13,'')
- elif 'mp4upload' in name :
- addDir(name,'http://www.mp4upload.com/embed-' + url + '.html',14,'')
- elif 'myvideo' in name :
- addDir(name + ' dont work','http://www.myvideo.de/watch/' + url,13,'')
- elif 'rutube' in name :
- addDir(name + ' dont work','http://rutube.ru/video/embed/' + url,13,'')
- elif 'veevr' in name :
- addDir(name + ' dont work','http://veevr.com/embed/' + url,13,'')
- elif 'novamov' in name :
- addDir(name,'http://embed.novamov.com//embed.php?v=' + url,13,'')
- elif 'videoweed' in name :
- addDir(name,'http://embed.videoweed.es//embed.php?v=' + url,13,'')
- elif 'faststream' in name :
- addDir(name + ' dont work','http://faststream.in//embed-' + url + '.html',13,'')
- elif 'myvi' in name :
- addDir(name + ' dont work','http://myvi.ru//ru//flash//player//' + url,13,'')
- elif 'proxer-stream' in name :
- addDir(name ,'http://stream.proxer.me/embed-'+ url + '-728x504.html',15,'')
- elif 'uploadc' in name :
- url = url.replace('\/','/')
- addDir(name + ' dont work',url,13,'')
- def video(url):
- videoLink = urlresolver.resolve(url)
- listitem = xbmcgui.ListItem(path=videoLink)
- xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
- def mp4upload(url):
- html = getUrl(url)
- match=re.findall("'file': '(.+?)'", html, re.DOTALL)
- vidlink = match[0]
- listitem = xbmcgui.ListItem(path=vidlink)
- xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
- def proxerhd(url):
- html = getUrl(url)
- parameters = re.findall(";',.*?'(.*?)'", html)
- parameters = parameters[0].split('|')
- code = re.findall('c:".+?://(.*?)"', html)
- code = list(code[0])
- stream = ''
- var = code[-7]
- for code in code:
- code = code.replace('a','10').replace('b','11').replace('c','12').replace('d','13').replace('e','14')
- try:
- code = parameters[int(code)]
- except:
- pass
- stream += code
- stream = 'http://' + stream.replace('//','/'+var+'/')
- addLink(name,stream,'')
- def get_params():
- param=[]
- paramstring=sys.argv[2]
- if len(paramstring)>=2:
- params=sys.argv[2]
- cleanedparams=params.replace('?','')
- if (params[len(params)-1]=='/'):
- params=params[0:len(params)-2]
- pairsofparams=cleanedparams.split('&')
- param={}
- for i in range(len(pairsofparams)):
- splitparams={}
- splitparams=pairsofparams[i].split('=')
- if (len(splitparams))==2:
- param[splitparams[0]]=splitparams[1]
- return param
- def addLink(name,url,iconimage):
- ok=True
- liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
- liz.setInfo( type="Video", infoLabels={ "Title": name } )
- liz.setProperty('IsPlayable', 'true')
- ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
- return ok
- def addDir(name,url,mode,iconimage):
- u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
- ok=True
- liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
- liz.setInfo( type="Video", infoLabels={ "Title": name } )
- ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
- return ok
- def getUrl(url):
- req = urllib2.Request(url)
- req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
- response = urllib2.urlopen(req)
- link=response.read()
- response.close()
- return link
- params=get_params()
- url=None
- name=None
- mode=None
- try:
- url=urllib.unquote_plus(params["url"])
- except:
- pass
- try:
- name=urllib.unquote_plus(params["name"])
- except:
- pass
- try:
- mode=int(params["mode"])
- except:
- pass
- print "Mode: "+str(mode)
- print "URL: "+str(url)
- print "Name: "+str(name)
- if mode==None or url==None or len(url)<1:
- print ""
- CATEGORIES()
- elif mode==1:
- print ""+url
- ALPHABET(url)
- elif mode==2:
- print ""+url
- ANIME(url)
- elif mode==3:
- print ""+url
- SEASON(url)
- elif mode==5:
- print ""+url
- SUFU(url)
- elif mode==9:
- print ""+url
- SELECTSUB(url)
- elif mode==10:
- print ""+url
- GERSUB(url)
- elif mode==11:
- print ""+url
- ENGSUB(url)
- elif mode==12:
- print ""+url
- GETHOST(url)
- elif mode==13:
- print ""+url
- video(url)
- elif mode==14:
- print ""+url
- mp4upload(url)
- elif mode==15:
- print ""+url
- proxerhd(url)
- xbmcplugin.endOfDirectory(int(sys.argv[1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement