PK %Ivdcn n plugin.video.empflix/addon.pyimport sys
import urllib
import urllib2
import cookielib
import re
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
settings = xbmcaddon.Addon(id='plugin.video.empflix')
cookiejar = cookielib.LWPCookieJar()
cookie_handler = urllib2.HTTPCookieProcessor(cookiejar)
opener = urllib2.build_opener(cookie_handler)
def CATEGORIES():
link = openURL('http://www.empflix.com/categories.php')
match = re.compile('/([^/]+)/\?a=1&d=" title="([^"]+)"').findall(link)
addDir('All', 'http://www.empflix.com/browse.php', 1, '', 1)
for channame, name in match:
addDir(name,
('http://www.empflix.com/' + channame),
2, '', 1)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def SORTMETHOD(url):
if url == 'http://www.empflix.com/browse.php':
addDir('Being Watched', url + '?category=bw', 2, '', 1)
addDir('Most Recent', url + '?category=mr', 2, '', 1)
addDir('Most Viewed', url + '?category=mv', 2, '', 1)
addDir('Top Rated', url + '?category=tr', 2, '', 1)
else:
match = re.compile('(http://www.empflix.com/channels/)'
'(.*)').findall(url)
for start, end in match:
addDir('Being Watched', start + 'watched-' + end, 2, '', 1)
addDir('Most Recent', start + 'new-' + end, 2, '', 1)
addDir('Most Viewed', start + 'popular-' + end, 2, '', 1)
addDir('Top Rated', start + 'rated-' + end, 2, '', 1)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def VIDEOLIST(url, page):
link = openURL(url + '/?page=' + str(page))
match = re.compile(r"data-vid.+?data-name='([^']+)'.+?href='([^']+).+?data-original='([^']+)'.+?'>([\d:]+)",
re.DOTALL).findall(link)
for name, videourl, thumb, duration in match:
addLink(name + ' (' + duration + ')',
'http://www.empflix.com' + videourl + '?',
3,
thumb.strip())
if len(match) == 24:
addDir('Next Page', url, 2, '', page + 1)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def PLAYVIDEO(url):
link = openURL(url)
match = re.compile('contentUrl" content="([^"]+)').findall(link)
xbmc.Player().play(match[0])
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('&')
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, 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)
ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u,
listitem=liz, isFolder=False)
return ok
def addDir(name, url, mode, iconimage, page):
u = sys.argv[0] + '?url=' + urllib.quote_plus(url) + '&mode=' + str(mode) +\
'&name=' + urllib.quote_plus(name) + '&page=' + str(page)
ok = True
liz = xbmcgui.ListItem(name, iconImage='DefaultFolder.png',
thumbnailImage=iconimage)
ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u,
listitem=liz, isFolder=True)
return ok
def openURL(url):
req = urllib2.Request(url)
response = urllib2.urlopen(req)
link = response.read()
response.close()
return link
def main():
params = get_params()
url = None
mode = None
page = 1
try:
url = urllib.unquote_plus(params['url'])
except:
pass
try:
mode = int(params['mode'])
except:
pass
try:
page = int(params['page'])
except:
pass
if mode is None or url is None or len(url) < 1:
CATEGORIES()
elif mode == 1:
xbmc.log('SORTMETHOD ' + url)
SORTMETHOD(url)
elif mode == 2:
xbmc.log('VIDEOLIST ' + url)
xbmc.log('VIDEOLIST ' + str(page))
VIDEOLIST(url, page)
elif mode == 3:
xbmc.log('PLAYVIDEO ' + url)
PLAYVIDEO(url)
if __name__ == '__main__':
main()
PK &Ie?Mj j plugin.video.empflix/addon.xml
video
Stream adult videos from empflix.com
Empflix.com features a variety of adult videos. This addon contains explicit adult material. You may only view this addon if you are at least 18 years of age, or at least the age of majority in the jurisdiction where you reside or from which you access this content. If you do not meet these requirements, then you do not have permission to use this addon. All content is hosted by empflix.com.
The author does not host or distribute any of the content displayed by this addon. The author does not have any affiliation with the content provider.
all
PK fvFC7%W plugin.video.empflix/icon.pngPNG
IHDR E X sRGB gAMA a pHYs od tEXtSoftware Paint.NET v3.36% QIDATx^]m]U- hbL
)J\BC-rLڎj1NEJ{fZkbiGݎI,c0Lj< Muzqgt4^{}}7}v$Q֍݄v$/+6Ci(zeh|EUP+7^W7?eW-eT@slwim](vVq2]\`p mǂV}1۾U6bXhq#V\VaMvvsrJ$pr" Hh,xn$HSMr"ω8txKVP͘}[NXq[ZO,c'
ۚ$
:Sj"AAjŀx`h\kԀH$bs<5o->!Rpb]-V,Rq{I0֫e1Gh.8i8}ERq8nNI9k9ljYs: H bPPhT@'yO'
sKrZQdִiZ|s22DFN0HD9W+EZBW^o~MA_4rBnwAxrBU:[/`)E1 iYq"'IwPAnCd Fy`\'q
mX ] ;Gh=b1{<;todb(I'H߷w}GE:cDxءܿ u
NР-9a>X/ I=W#LGE*b'DBm!7xT`A_ȌW5+]t> 3>S''`5Ay.nHo@-'r[NdH "o9s//2NH\ {,OJ+boN؏W.W['8