Exemple #1
0
def LINKLISTSS(mname, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '')
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile('<p><!--baslik:.+?--><br /><IFRAME SRC="(.+?)"',
                       re.I).findall(link)
    if match:
        host = re.compile("http://(.+?)/.+?").findall(match[0])
        host = host[0].replace('www.', '')
        host = host.split('.')[0]
        if main.supportedHost(host):
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]',
                          match[0], 327,
                          art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
    match = re.compile('<a href="([^<]+)"><span>(.+?)</span></a>',
                       re.DOTALL).findall(link)
    for url, host in match:
        if main.supportedHost(host):
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]',
                          url, 327, art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
Exemple #2
0
def LINKLIST(mname, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '<iframe src="//www.facebook.com/plugins/likebox.php',
        '').replace('<iframe src="http://creative.rev2pub.com', '')
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile('<center><iframe.+?src="(.+?)".+?',
                       re.DOTALL | re.IGNORECASE).findall(link)
    #main.ErrorReport(match)
    for url in match:
        hostn = re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host = hname.replace('www.', '').replace('embed.', '').replace(
                '.es', '').replace('.in', '').replace('.sx', '').replace(
                    '.net', '').replace('.com', '').replace('.to', '').replace(
                        '.org', '').replace('.ch',
                                            '').replace('.eu',
                                                        '').replace('.ES', '')
            host = host.split('.')[0]
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]',
                          url, 797, art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
Exemple #3
0
def LINKLIST(mname, url):
    link = main.OPENURL(url)
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile(
        '<span class="(.+?)">.+?</span></td><td class="tdcalidad">(.+?)</td><td class=".+?<img src=".+?" alt="(.+?)" />.+?</td>.+?title=".+?" href="(.+?)">',
        re.DOTALL).findall(link)
    for lang, qua, host, url in match:
        if 'flag flag_0' in lang:
            lang = ' [COLOR red]ESP[/COLOR]'
        if 'flag flag_1' in lang:
            lang = ' [COLOR yellow]LAT[/COLOR]'
        if 'flag flag_2' in lang:
            lang = ' [COLOR purple]ENG[/COLOR]'
        if 'flag flag_3' in lang:
            lang = ' [COLOR green]SUB[/COLOR]'
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(
                mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]' + lang +
                ' [COLOR aqua]' + qua + '[/COLOR]', url, 67,
                art + '/hosts/' + host.lower() + ".png",
                art + '/hosts/' + host.lower() + ".png")
Exemple #4
0
def LINKLIST(mname, url):
    link = main.OPENURL2(url)
    link = link.replace('<iframe src="http://ads.affbuzzads.com', '')
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile('<iframe src="(.+?)" frameborder',
                       re.DOTALL).findall(link)
    for url in match:
        hostn = re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host = hname.replace('www.', '').replace('embed.', '').replace(
                '.es', '').replace('.in', '').replace('.sx', '').replace(
                    '.net', '').replace('.com', '').replace('.to', '').replace(
                        '.org', '').replace('.ch',
                                            '').replace('.eu',
                                                        '').replace('.ES', '')
            host = host.split('.')[0]
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]',
                          url, 314, art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
def iWatchLINK(mname, url):
    link = main.OPENURL(url)
    movie_content = main.unescapes(link)
    movie_content = re.sub("\\\"", "\"", movie_content)
    movie_content = movie_content.replace('\'', '')
    from resources.universal import _common as univ_common
    link2 = univ_common.str_conv(decode(movie_content))
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    links = re.search('<tbody>(.+?)</tbody>', link2)

    if links:
        links = links.group(1)
        print links

        match = re.compile(
            '<a href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?> ([^<]+?)</td>  <td><img src=".+?</td>  <td>.+?</td>  <td>([^<]+?)</td>',
            re.DOTALL).findall(links)
        for url, name, qua in match:
            name = name.replace(' ', '')
            if name[0:1] == '.':
                name = name[1:]
            name = name.split('.')[0]
            if main.supportedHost(name.lower()):
                main.addDown2(
                    mname + ' [COLOR red](' + qua + ')[/COLOR]' +
                    ' [COLOR blue]' + name.upper() + '[/COLOR]', url, 649,
                    art + '/hosts/' + name.lower() + '.png',
                    art + '/hosts/' + name.lower() + '.png')
def LINKSP2(mname,url):
    link=main.OPENURL(url)
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    
    match0=re.compile('title="[^"]+?">([^"]+?)</a>.+?</p><ul>(.+?)</ul>').findall(link)
    if not match0:
        match0=re.compile('<h4>(.+?)</h4>(.+?)</ul>').findall(link)
        if not match0:
            match0=re.compile('<p><img src=".+?" alt="([^"]+?)" /></p>.+?<ul>(.+?)</ul>').findall(link)
    for mname, links in reversed(match0):
        match1=re.compile('<li><a href="([^"]+?)"[^>]*?><img [^>]*?alt="([^"]+?)"[^>]*?></a></li>').findall(links)
        match= match1 + re.compile('<li><a href="([^"]+?)"[^>]*?>([^>]+?)</a></li>').findall(links)
        filename = False
        for murl, name in match:
            fn = re.search('/([^/]+?\.(mkv|avi|mp4))(\.html)?$',murl)
            if fn:
                filename = fn.group(1)
                break
        for murl, name in match:
            name = name[0].upper() + name[1:]
            if main.supportedHost(name):
                thumb=name.lower()
#                 if re.search('billionuploads',murl) and filename: murl += '#@#' + filename
                main.addDown2(main.CleanTitle(mname)+' [COLOR blue]'+name+'[/COLOR]',murl,209,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")
Exemple #7
0
def LISTHOST(mname,murl,thumb):
    epi = re.findall('\ss(\d+)e(\d+)\s',mname + " ",re.I)
    for s,e in epi: pass
    if e[0:1]=='0': epis=e[1:]
    else: epis=e
    CheckNextEpi= int(epis)+1
    if(len(str(CheckNextEpi))==1): CheckNextEpi = "0" + str(CheckNextEpi)
    CheckNextEpi ="S" + str(s) + "E" + str(CheckNextEpi)
    CurrentEpi = re.search('(?i)(s\d+e\d+)',mname)
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    if CheckNextEpi in link: links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<div class="right">'+CheckNextEpi+'.+?</div>', link)
    else: links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<!-- End of the page footer -->', link)
    if links:
        links = links.group(1)
        match=re.compile('''<a onclick='.+?href="([^"]+?)" target=".+?"><div>.+?</div><span>Loading Time: <span class='.+?'>([^<]+?)</span><br/>Host:(.+?)<br/>''', re.DOTALL).findall(links)
        for url, loadtime, name in match:
            domain=name    
            name=name.replace(' ','')
            if name[0:1]=='.': name=name[1:]
            name=name.split('.')[0]
            if main.supportedHost(name.strip().lower()):
                try:mediaID=url.split('?id=')[1]
                except:mediaID=url.split('http://')[1].split('/')[1]
                main.addDown2(mname+' [COLOR red](Loading Time: '+loadtime+')[/COLOR]'+' [COLOR blue]'+name.upper()+'[/COLOR]',name.lower().strip()+'x1x8x'+mediaID,462,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
Exemple #8
0
def ListDirectDownloadTVLinks(mname, url):
    ok = True
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile('{"url":"([^"]+?)","hostname":"([^"]+?)"}').findall(url)
    prev = ''
    archived = ''
    for url, host in match:
        if (host == prev and not host in archived):
            archived += host
        prev = host
    h = 0
    for url, host in match:
        thumb = host.lower()
        urlExceptions = re.compile('rar').findall(url)
        if not (urlExceptions
                or host in archived) and main.supportedHost(host):
            h += 1
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + '[/COLOR]',
                          url, 210, art + "/hosts/" + thumb + ".png",
                          art + "/hosts/" + thumb + ".png")
    if not h:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        xbmc.executebuiltin(
            "XBMC.Notification(Sorry,No Playable Links Found,2000)")
Exemple #9
0
def LINKLIST2(mname,url):
    if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('href="(.+?)" target="_blank">(.+?)</a>',re.DOTALL).findall(url)
    for url,host in match:
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Exemple #10
0
def LISTEPISODE(mname, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '')
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile(
        '<dd><a href="([^<]+)" class="zoombox.+?" title="([^<]+)">',
        re.DOTALL).findall(link)
    for url, name in match:
        hostn = re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host = hname.replace('www.', '').replace('embed.', '').replace(
                '.es', '').replace('.in', '').replace('.sx', '').replace(
                    '.net', '').replace('.com', '').replace('.to', '').replace(
                        '.org', '').replace('.ch',
                                            '').replace('.eu',
                                                        '').replace('.ES', '')
            host = host.split('.')[0]
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(name + ' [COLOR blue]' + host.upper() + ' [/COLOR]',
                          url, 797, art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
Exemple #11
0
def LISTHOSTERS(name, url):
    html = GETHTML(url)
    if html == None: return
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    r = re.findall(r'class="td_cols"><a target=\'_blank\'.+?href=\'(.+?)\'>',
                   html, re.M | re.DOTALL)
    try:
        t = re.findall(r'rel="nofollow">((?!.*\.rar).*)</a>', html, re.I)
        r = r + t
    except:
        pass
    if len(r) == 0:
        addon.show_ok_dialog([
            'No Playable Streams Found,',
            'It Might Be That They Are Still Being Uploaded,',
            'Or They Are Unstreamable Archive Files'
        ], 'MashUP: TV-Release')
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        return
    from urlparse import urlparse
    for url in r:
        url = url.replace("180upload.nl", "180upload.com")
        host = urlparse(url).hostname.replace('www.', '').partition('.')[0]
        if main.supportedHost(host):
            main.addDown2(
                name.strip() + " [COLOR blue]" + host.upper() + "[/COLOR]",
                url, 1005, art + '/hosts/' + host + '.png',
                art + '/hosts/' + host + '.png')
Exemple #12
0
def LINKLISTSS(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<p><!--baslik:.+?--><br /><IFRAME SRC="(.+?)"',re.I).findall(link)
    if match:
        host=re.compile("http://(.+?)/.+?").findall(match[0])
        host=host[0].replace('www.','')
        host=host.split('.')[0]
        if main.supportedHost(host):
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',match[0],327,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
    match=re.compile('<a href="([^<]+)"><span>(.+?)</span></a>',re.DOTALL).findall(link)
    for url,host in match:
        if main.supportedHost(host):
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,327,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
def ListSceneLogLinks(mname,url):
    html = main.OPENURL(url)
    html = main.unescapes(html)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    paragraphs = re.compile('<p>.*?</p>',re.I|re.DOTALL).findall(html)
    itemsAdded = 0
    from urlparse import urlparse
    for paragraph in paragraphs:
        links = re.compile('<a[\s]*?href="(.*?)"',re.I|re.DOTALL).findall(paragraph)
        if len(links) == 1: # if more than 1 links per paragraph, its probably splitted file
            for url in links:
                if not re.search('rar',url,re.I):
                    host = urlparse(url).hostname.replace('www.','').partition('.')[0]
                    if main.supportedHost(host):
                        title = mname
                        quality = re.search('(?i)(720p|1080p|HDTV|PDTV|WEB DL|DVDRIP|WS DSR|DSR|BDRip|WEBRiP)',url,re.I)
                        if quality and not quality.group(1).lower() in mname.lower() :
                            title = re.sub('\[COLOR.*?\[/COLOR\]','',title).strip()
                            title += ' [COLOR red]'+quality.group(1).upper()+'[/COLOR]'
                        host = re.sub('^(https?://)?[^/]*?([^/^.]+?)\.\w+?/.*','\\2',url).upper()
                        thumb = host.lower()
                        main.addDown2(title+' [COLOR blue]'+host+'[/COLOR]',url,658,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")
                        itemsAdded += 1
    if not itemsAdded:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        xbmc.executebuiltin("XBMC.Notification(Sorry,No sources found!,3000)")
Exemple #14
0
def LISTHOST(mname,murl,thumb):
    epi = re.findall('\ss(\d+)e(\d+)\s',mname + " ",re.I)
    for s,e in epi:
        pass
    if e[0:1]=='0':
        epis=e[1:]
    else:
        epis=e
    CheckNextEpi= int(epis)+1
    if(len(str(CheckNextEpi))==1): CheckNextEpi = "0" + str(CheckNextEpi)
    CheckNextEpi ="S" + str(s) + "E" + str(CheckNextEpi)
    CurrentEpi = re.search('(?i)(s\d+e\d+)',mname)
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    if CheckNextEpi in link:
        links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<div class="right">'+CheckNextEpi+'.+?</div>', link)
    else:
        links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<!-- End of the page footer -->', link)
    if links:
        links = links.group(1)
        match=re.compile('''<a onclick='.+?href="([^"]+?)" target=".+?"><div>.+?</div><span>Loading Time: <span class='.+?'>([^<]+?)</span><br/>Host:(.+?)<br/>''', re.DOTALL).findall(links)
        for url, loadtime, name in match:
            domain=name    
            name=name.replace(' ','')
            if name[0:1]=='.':
                name=name[1:]
            name=name.split('.')[0]
            if main.supportedHost(name.strip().lower()):
                try:mediaID=url.split('?id=')[1]
                except:mediaID=url.split('http://')[1].split('/')[1]
                main.addDown2(mname+' [COLOR red](Loading Time: '+loadtime+')[/COLOR]'+' [COLOR blue]'+name.upper()+'[/COLOR]',name.lower().strip()+'x1x8x'+mediaID,462,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
def LINKSP2(mname, url):
    link = main.OPENURL(url)
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match0 = re.compile('<h4>(.+?)</h4>(.+?)</ul>').findall(link)
    if not match0:
        match0 = re.compile(
            'title="[^"]+?">([^"]+?)</a>.+?</p><ul>(.+?)</ul>').findall(link)
    for mname, links in reversed(match0):
        match1 = re.compile(
            '<li><a href="([^"]+?)"[^>]*?><img [^>]*?alt="([^"]+?)"[^>]*?></a></li>'
        ).findall(links)
        match = match1 + re.compile(
            '<li><a href="([^"]+?)"[^>]*?>([^>]+?)</a></li>').findall(links)
        filename = False
        for murl, name in match:
            fn = re.search('/([^/]+?\.(mkv|avi|mp4))(\.html)?$', murl)
            if fn:
                filename = fn.group(1)
                break
        for murl, name in match:
            name = name[0].upper() + name[1:]
            if main.supportedHost(name):
                thumb = name.lower()
                #                 if re.search('billionuploads',murl) and filename: murl += '#@#' + filename
                main.addDown2(mname + ' [COLOR blue]' + name + '[/COLOR]',
                              murl, 209, art + '/hosts/' + thumb + ".png",
                              art + '/hosts/' + thumb + ".png")
Exemple #16
0
def LINKLIST2(mname,url):
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('href="(.+?)" target="_blank">(.+?)</a>',re.DOTALL).findall(url)
    for url,host in match:
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,789,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Exemple #17
0
def LINKLIST(mname,url):
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""",re.DOTALL).findall(link)
    for host,url in match:
        host=host.replace(' Java','').replace('ShockShare','SockShare').replace('.to','')
        print host
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]','http://www.estrenosvk.com/player/'+url,310,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
Exemple #18
0
def LINK2(name,url):      
        html = main.OPENURL(url)
        html=html.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('IFRAME SRC','iframe src').replace("",'').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-')
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
        r = re.compile(r'<b>([^"]*)</b></span><br /><iframe src="([^"]*)"',re.M|re.DOTALL).findall(html)
        for host,url in r:
            from urlparse import urlparse    
            host = urlparse(url).hostname.replace('www.','').partition('.')[0]
            if main.supportedHost(host):
             main.addDown2(name.strip()+" [COLOR blue]"+host.upper()+"[/COLOR]",url,2,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
Exemple #19
0
def ListDirectDownloadTVLinks(mname,url):
    ok=True
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('{"url":"([^"]+?)","hostname":"([^"]+?)"}').findall(url)
    for url,host in match:
        thumb=host.lower()
        urlExceptions = re.compile('rar').findall(url)
#         hostExceptions = re.compile('fileom|oteupload').findall(host)
#         if not urlExceptions and not hostExceptions:
        if not urlExceptions and main.supportedHost(host):
            main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]',url,210,art+"/hosts/"+thumb+".png",art+"/hosts/"+thumb+".png")     
Exemple #20
0
def LINKLIST(mname,url):
    link=main.OPENURL2(url)
    link=link.replace('<iframe src="http://ads.affbuzzads.com','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<iframe src="(.+?)" frameborder',re.DOTALL).findall(link)
    for url in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Exemple #21
0
def LISTEPISODE(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<dd><a href="([^<]+)" class="zoombox.+?" title="([^<]+)">',re.DOTALL).findall(link)
    for url,name in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(name+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Exemple #22
0
def LINKLIST(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('<iframe src="//www.facebook.com/plugins/likebox.php','').replace('<iframe src="http://creative.rev2pub.com','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<center><iframe.+?src="(.+?)".+?',re.DOTALL | re.IGNORECASE).findall(link)
    #main.ErrorReport(match)
    for url in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
def LINKLIST(mname,url):
    link=main.OPENURL(url)
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<span class="(.+?)">.+?</span></td><td class="tdcalidad">(.+?)</td><td class=".+?<img src=".+?" alt="(.+?)" />.+?</td>.+?title=".+?" href="(.+?)">',re.DOTALL).findall(link)
    for lang,qua,host,url in match:
        if 'flag flag_0' in lang:
            lang= ' [COLOR red]ESP[/COLOR]'
        if 'flag flag_1' in lang:
            lang= ' [COLOR yellow]LAT[/COLOR]'
        if 'flag flag_2' in lang:
            lang= ' [COLOR purple]ENG[/COLOR]'
        if 'flag flag_3' in lang:
            lang= ' [COLOR green]SUB[/COLOR]'
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]'+ lang+' [COLOR aqua]'+qua+'[/COLOR]',url,67,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")    
Exemple #24
0
def LINK2(name, url):
    html = main.OPENURL(url)
    html = html.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;',
        '').replace('IFRAME SRC', 'iframe src').replace("", '').replace(
            '\xe2\x80\x99', "'").replace('\xe2\x80\x93', '-')
    main.addLink(
        "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
        '', '')
    r = re.compile(r'<b>([^"]*)</b></span><br /><iframe src="([^"]*)"',
                   re.M | re.DOTALL).findall(html)
    for host, url in r:
        from urlparse import urlparse
        host = urlparse(url).hostname.replace('www.', '').partition('.')[0]
        if main.supportedHost(host):
            main.addDown2(
                name.strip() + " [COLOR blue]" + host.upper() + "[/COLOR]",
                url, 2, art + '/hosts/' + host + '.png',
                art + '/hosts/' + host + '.png')
Exemple #25
0
def LINKLIST(mname, url):
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    match = re.compile(
        """><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""",
        re.DOTALL).findall(link)
    for host, url in match:
        host = host.replace(' Java',
                            '').replace('ShockShare',
                                        'SockShare').replace('.to', '')
        print host
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(mname + ' [COLOR blue]' + host.upper() + '[/COLOR]',
                          'http://www.estrenosvk.com/player/' + url, 310,
                          art + '/hosts/' + host.lower() + ".png",
                          art + '/hosts/' + host.lower() + ".png")
Exemple #26
0
def ListSceneLogLinks(mname, url):
    html = main.OPENURL(url)
    html = main.unescapes(html)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink(
            "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
            '', '')
    paragraphs = re.compile('<p>.*?</p>', re.I | re.DOTALL).findall(html)
    itemsAdded = 0
    from urlparse import urlparse
    for paragraph in paragraphs:
        links = re.compile('<a[\s]*?href="(.*?)"',
                           re.I | re.DOTALL).findall(paragraph)
        if len(
                links
        ) == 1:  # if more than 1 links per paragraph, its probably splitted file
            for url in links:
                if not re.search('rar', url, re.I):
                    host = urlparse(url).hostname.replace('www.',
                                                          '').partition('.')[0]
                    if main.supportedHost(host):
                        title = mname
                        quality = re.search(
                            '(?i)(720p|1080p|HDTV|PDTV|WEB DL|DVDRIP|WS DSR|DSR|BDRip|WEBRiP)',
                            url, re.I)
                        if quality and not quality.group(
                                1).lower() in mname.lower():
                            title = re.sub('\[COLOR.*?\[/COLOR\]', '',
                                           title).strip()
                            title += ' [COLOR red]' + quality.group(
                                1).upper() + '[/COLOR]'
                        host = re.sub('^(https?://)?[^/]*?([^/^.]+?)\.\w+?/.*',
                                      '\\2', url).upper()
                        thumb = host.lower()
                        main.addDown2(
                            title + ' [COLOR blue]' + host + '[/COLOR]', url,
                            658, art + '/hosts/' + thumb + ".png",
                            art + '/hosts/' + thumb + ".png")
                        itemsAdded += 1
    if not itemsAdded:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        xbmc.executebuiltin("XBMC.Notification(Sorry,No sources found!,3000)")
Exemple #27
0
def LINKLIST(mname, url):
    link = main.OPENURL(url)
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
    match = re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""", re.DOTALL).findall(
        link
    )
    for host, url in match:
        host = host.replace(" Java", "").replace("ShockShare", "SockShare").replace(".to", "")
        print host
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(
                mname + " [COLOR blue]" + host.upper() + "[/COLOR]",
                "http://www.fxcine.com/player/" + url,
                310,
                art + "/hosts/" + host.lower() + ".png",
                art + "/hosts/" + host.lower() + ".png",
            )
Exemple #28
0
def LISTHOSTERS(name,url):
    html = GETHTML(url)
    if html == None: return
    if selfAddon.getSetting("hide-download-instructions") != "true":
            main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    r = re.findall(r'class="td_cols"><a target=\'_blank\'.+?href=\'(.+?)\'>',html, re.M|re.DOTALL)
    try:
        t = re.findall(r'rel="nofollow">((?!.*\.rar).*)</a>', html, re.I)
        r = r+t
    except: pass
    if len(r) == 0:
        addon.show_ok_dialog(['No Playable Streams Found,','It Might Be That They Are Still Being Uploaded,',
                              'Or They Are Unstreamable Archive Files'],'MashUP: TV-Release')
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        return
    from urlparse import urlparse
    for url in r:
        url = url.replace("180upload.nl","180upload.com")
        host = urlparse(url).hostname.replace('www.','').partition('.')[0]
        if main.supportedHost(host):
            main.addDown2(name.strip()+" [COLOR blue]"+host.upper()+"[/COLOR]",url,1005,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
Exemple #29
0
def ListDirectDownloadTVLinks(mname,url):
    ok=True
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('{"url":"([^"]+?)","hostname":"([^"]+?)"}').findall(url)
    prev = ''
    archived = ''
    for url,host in match:
        if (host == prev and not host in archived ):
            archived += host
        prev = host
    h = 0
    for url,host in match:
        thumb=host.lower()
        urlExceptions = re.compile('rar').findall(url)
        if not (urlExceptions or host in archived) and main.supportedHost(host):
            h += 1
            main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]',url,210,art+"/hosts/"+thumb+".png",art+"/hosts/"+thumb+".png")     
    if not h:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        xbmc.executebuiltin("XBMC.Notification(Sorry,No Playable Links Found,2000)")
def iWatchLINK(mname,url):      
    link=main.OPENURL(url)
    movie_content = main.unescapes(link)
    movie_content = re.sub("\\\"", "\"", movie_content)
    movie_content=movie_content.replace('\'','')  
    from resources.universal import _common as univ_common
    link2 = univ_common.str_conv(decode(movie_content))
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    links = re.search('<tbody>(.+?)</tbody>', link2)
    
    if links:
        links = links.group(1).replace('  ','')
        #print links         href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?>([^<]+?)</td><td><img src=".+?</td><td>.+?</td><td>([^<]+?)</td>
        match=re.compile('href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?>([^<]+?)</td><td><img src=".+?</td><td>.+?</td><td>([^<]+?)</td>', re.DOTALL).findall(links)
        for url, name, qua in match:
            name=name.replace(' ','')
            if name[0:1]=='.':
                name=name[1:]
            name=name.split('.')[0]
            if main.supportedHost(name.lower()):
                main.addDown2(mname+' [COLOR red]('+qua+')[/COLOR]'+' [COLOR blue]'+name.upper()+'[/COLOR]',url,649,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
Exemple #31
0
def LISTSP3(murl):
    subpages = 5
    if murl == 'HD':
        page = 1
        max = 100
    else:
        try:
            pages = murl.split(',', 1 );
            page = int(pages[0])
            max = int(pages[1])
        except:
            page = 1
#         http://www.filestube.to/query.html?q=1080p+bluray+-esubs+-msubs+-subs&hosting=85&select=mkv&sizefrom=6000&sizeto=20000&sort=dd&page=1
    hosts = ""
    possiblehosts = (
                     ["lumfile.com","85"],
                     ["turbobit.net","40"],
#                      ["fileom.com","106"],
#                      ["letitbit.net","25"],
                     ) 
    for h,n in possiblehosts:
        if main.supportedHost(h): hosts += n+"%2C"
    hosts = hosts.rstrip("%2C")  
    url='http://www.filestube.to/query.html?q=1080p+bluray+-esubs&hosting='+hosts+'&select=mkv&sizefrom=5000&sizeto=20000&sort=dd'
    urls = []
    for n in range(subpages):
        urls.append(url+"&page="+str(page+n))
        if page+n == max: break
    page = page + subpages - 1
    link=main.batchOPENURL(urls)
#         print link
    next = len(re.compile('>&#9658;</a>').findall(link)) == subpages
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&#38;','&')
    match=re.compile('(?sim)<a href="([^"]+?)"[^>]*?class="rL"[^>]*?>(.+?)</a>.*?class="eT.*?<b>([^>]*?)<').findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    match1 = []
    for url, name, hostsite in match:
        name = name.replace('<b>','').replace('</b>','')
        name=main.unescapes(name)
        if not re.search('(?i)(\\bsubs\\b|\\msubs\\b|fetish)',name) and re.search('(?i)(20\d\d|19\d\d)',name):
            match1.append((url,name,hostsite))
    match = match1
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    for url, name, hostsite in match:
        url = url.decode('utf-8').encode('ascii', 'ignore')
        url = 'http://www.filestube.to' + url
        main.addPlayM(name.strip() + " [COLOR red]" + hostsite + "[/COLOR]",url,406,'','','','','','')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): break
    if next and loadedLinks >= totalLinks:
        main.addDir('Page ' + str(page/subpages) + ' [COLOR blue]Next Page >>>[/COLOR]',str(page+1)+','+str(max),405,art+'/next2.png')
    dialogWait.close()
    del dialogWait
    main.GA("HD-TV","FilesTube")
    main.VIEWS()
Exemple #32
0
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(
        '&nbsp;', '').replace('&#38;', '&')
    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
Exemple #33
0
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('&nbsp;','').replace('&#38;','&')
    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
Exemple #34
0
def VIDEOLINKSSCEPER(mname, murl, thumb):
    main.GA("Sceper", "Watched")
    msg = xbmcgui.DialogProgress()
    msg.create("Please Wait!", "")
    msg.update(0, "Collecting hosts")
    link = main.OPENURL(murl, cookie="sceper")
    sources = []
    titles = []
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    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)<p.*?</p>").findall(link)
    for paragraph in paragraphs:
        domains = re.compile('<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
        urls = re.compile('<a href="([^"]+)(?!jpg|gif|jpeg|png)">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
    #         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:
        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:
            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()
            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 + 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("plugin.video.movie25")
            wh.add_item(
                mname + " " + "[COLOR green]Sceper[/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("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 id="copy_paste_links"[^<]+?</pre>').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
Exemple #36
0
def LISTHOST(mname, murl, thumb):
    epi = re.findall("\ss(\d+)e(\d+)\s", mname + " ", re.I)
    for s, e in epi:
        pass
    if e[0:1] == "0":
        epis = e[1:]
    else:
        epis = e
    CheckNextEpi = int(epis) + 1
    if len(str(CheckNextEpi)) == 1:
        CheckNextEpi = "0" + str(CheckNextEpi)
    CheckNextEpi = "S" + str(s) + "E" + str(CheckNextEpi)
    CurrentEpi = re.search("(?i)(s\d+e\d+)", mname)
    link = main.OPENURL(murl)
    link = link.replace("\r", "").replace("\n", "").replace("\t", "")
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
    if CheckNextEpi in link:
        links = re.search(
            '<td class="mnllinklist" align="right"><div class="right">'
            + CurrentEpi.group(1)
            + '.+?</div>(.+?)<div class="right">'
            + CheckNextEpi
            + ".+?</div>",
            link,
        )
    else:
        links = re.search(
            '<td class="mnllinklist" align="right"><div class="right">'
            + CurrentEpi.group(1)
            + ".+?</div>(.+?)<!-- End of the page footer -->",
            link,
        )
    if links:
        links = links.group(1)
        match = re.compile(
            """<a onclick='.+?href="([^"]+?)" target=".+?"><div>.+?</div><span>Loading Time: <span class='.+?'>([^<]+?)</span><br/>Host:(.+?)<br/>""",
            re.DOTALL,
        ).findall(links)
        for url, loadtime, name in match:
            domain = name
            name = name.replace(" ", "")
            if name[0:1] == ".":
                name = name[1:]
            name = name.split(".")[0]
            if main.supportedHost(name.strip().lower()):
                try:
                    mediaID = url.split("?id=")[1]
                except:
                    mediaID = url.split("http://")[1].split("/")[1]
                main.addDown2(
                    mname
                    + " [COLOR red](Loading Time: "
                    + loadtime
                    + ")[/COLOR]"
                    + " [COLOR blue]"
                    + name.upper()
                    + "[/COLOR]",
                    name.lower().strip() + "x1x8x" + mediaID,
                    462,
                    art + "/hosts/" + name.lower() + ".png",
                    art + "/hosts/" + name.lower() + ".png",
                )
Exemple #37
0
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
Exemple #38
0
def LISTSP3(murl):
    subpages = 5
    if murl == 'HD':
        page = 1
        max = 100
    else:
        try:
            pages = murl.split(',', 1 );
            page = int(pages[0])
            max = int(pages[1])
        except:
            page = 1
#         http://www.filestube.com/query.html?q=1080p+bluray+-esubs+-msubs+-subs&hosting=85&select=mkv&sizefrom=6000&sizeto=20000&sort=dd&page=1
    hosts = ""
    possiblehosts = (
                     ["lumfile.com","85"],
                     ["turbobit.net","40"],
#                      ["fileom.com","106"],
#                      ["letitbit.net","25"],
                     ) 
    for h,n in possiblehosts:
        if main.supportedHost(h): hosts += n+"%2C"
    hosts = hosts.rstrip("%2C")  
    url='http://www.filestube.com/query.html?q=1080p+bluray+-esubs&hosting='+hosts+'&select=mkv&sizefrom=5000&sizeto=20000&sort=dd'
    urls = []
    for n in range(subpages):
        urls.append(url+"&page="+str(page+n))
        if page+n == max: break
    page = page + subpages - 1
    link=main.batchOPENURL(urls)
#         print link
    next = len(re.compile('>&#9658;</a>').findall(link)) == subpages
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&#38;','&')
    match=re.compile('(?sim)<a href="([^"]+?)"[^>]*?class="rL"[^>]*?>(.+?)</a>.*?class="eT.*?<b>([^>]*?)<').findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    match1 = []
    for url, name, hostsite in match:
        name = name.replace('<b>','').replace('</b>','')
        name=main.unescapes(name)
        if not re.search('(?i)(\\bsubs\\b|\\msubs\\b|fetish)',name) and re.search('(?i)(20\d\d|19\d\d)',name):
            match1.append((url,name,hostsite))
    match = match1
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    for url, name, hostsite in match:
        url = url.decode('utf-8').encode('ascii', 'ignore')
        url = 'http://www.filestube.com' + url
        main.addPlayM(main.CleanTitle(name.strip()) + " [COLOR red]" + hostsite + "[/COLOR]",url,406,'','','','','','')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): break
    if next and loadedLinks >= totalLinks:
        main.addDir('Page ' + str(page/subpages) + ' [COLOR blue]Next Page >>>[/COLOR]',str(page+1)+','+str(max),405,art+'/next2.png')
    dialogWait.close()
    del dialogWait
    #main.GA("HD-TV","FilesTube")
    main.VIEWS()
Exemple #39
0
def VIDEOLINKSSCEPER(mname,murl,thumb):
        msg = xbmcgui.DialogProgress()
        msg.create('Please Wait!','')
        msg.update(0,'Collecting hosts')
        link=main.OPENURL(murl, cookie="sceper")
        sources=[]
        titles=[]
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        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)<p.*?</p>').findall(link)
        for paragraph in paragraphs:
            domains = re.compile('<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
            urls = re.compile('<a href="([^"]+)(?!jpg|gif|jpeg|png)">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
#         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:
            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:
                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()
                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 + 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('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]Sceper[/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
Exemple #40
0
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
Exemple #41
0
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(
        '&nbsp;', '').replace('&#38;', '&')
    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