Esempio n. 1
0
def List2(url):
        link=main.OPEN_URL(url)
        match=re.compile('class="contentarchivetime">([^"]*)</div><div class="contentarchivetitle"><a href="([^"]*)" title=".+?">([^"]*)</a></div>').findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
        for date,url,name in match:
            name=name.replace('&#8211;',' - ').replace('&#039;',"'")    
            #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
            main.addDirTE(name+' [COLOR red]'+date+'[/COLOR]',url,865,'','','','','','')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100)/totalLinks
            remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
            if (dialogWait.iscanceled()):
                return False   
        dialogWait.close()
        del dialogWait

        paginate=re.compile('="nextpostslink" rel="next" href="([^"]*)">&raquo;</a>').findall(link)
        if paginate:
          xurl=paginate[0]         
          main.addDir('[COLOR blue]Next Page'+'[/COLOR]',xurl,864,art+'/next2.png') 
Esempio n. 2
0
def List2(url):
    link = main.OPEN_URL(url)
    match = re.compile(
        'class="contentarchivetime">([^"]*)</div><div class="contentarchivetitle"><a href="([^"]*)" title=".+?">([^"]*)</a></div>'
    ).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Show list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Episodes loaded :: [B]' + str(
        loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    for date, url, name in match:
        name = name.replace('&#8211;', ' - ').replace('&#039;', "'")
        #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
        main.addDirTE(name + ' [COLOR red]' + date + '[/COLOR]', url, 865, '',
                      '', '', '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Episodes loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if (dialogWait.iscanceled()):
            return False
    dialogWait.close()
    del dialogWait

    paginate = re.compile(
        '="nextpostslink" rel="next" href="([^"]*)">&raquo;</a>').findall(link)
    if paginate:
        xurl = paginate[0]
        main.addDir('[COLOR blue]Next Page' + '[/COLOR]', xurl, 864,
                    art + '/next2.png')
Esempio n. 3
0
def Premiers(url,name): ################# Premiers #################
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
        match = re.findall('<a href="([^"]*)" style=".+?background-image: url([^"]*);".+?><h2>([^"]*)</h2>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for url,thumb,name in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('">'," ")
                thumb = base_url + thumb
                url = 'http://www.thedarewall.com/' + url
                main.addDirTE(name,url,7,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')        
Esempio n. 4
0
def TVIndex(url,index=False): #################  TV Index #################
    link=main.OPEN_URL(url)
    link=main.unescapes(link)
    match = re.findall('''<div class="view_img">\s*<a href="([^"]*?)" class="spec-border-ie" title="">\s*<img class="img-preview spec-border"  src="([^']*?)" alt=" " style="background-color: #717171;"/>\s*</a>\s*</div>\s*<h5>\s*<a class="link" href=".+?title=".+?">([^"]*?)</a>\s*</h5><p class="left">([^"]*?)</p>''',link)   
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Show list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Shows loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,thumb,name,season in match:
        main.addDirTE(name+ ' ' + season,url,75,thumb,'','','','','')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Shows loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): return False   
    dialogWait.close()
    del dialogWait
     
    nextpage=re.compile('><a href="([^"]*?)">&raquo;</a></li>             </ul>        </div>        <div class="show_all_btn"><ul class="pagination"><li>').findall(link)
    for url in nextpage:
     main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next.png')    

    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
    main.VIEWS()            
Esempio n. 5
0
def TVIndex(url): #################  TV Index #################
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
        match = re.findall('<img class="img-preview spec-border"  src="([^"]*?)" alt=" " style="background.+?<a class="link" href="([^"]*?)" title=".+?">([^"]*?)</a>.+?</h5><p class="left">([^"]*?)</p>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Latest Episodes Loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for thumb,url,name,season in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-')
                #main.addInfo(name+ ' ' + season,url,75,thumb,'','')
                main.addDirTE(name+ ' ' + season,url,75,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Latest Episodes Loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        nextpage=re.compile('><a href="([^"]*?)">&raquo;</a></li>             </ul>        </div>        <div class="show_all_btn"><ul class="pagination"><li>').findall(link)
        for url in nextpage:
                main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next.png')
                xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')  
Esempio n. 6
0
def SearchResults(url):
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('\xe2\x80\xa6','...').replace('&#8211;','-').replace('#038;','').replace('&#039;',"'")
        match = re.findall('class="view_img">.+?<a href="([^"]*?)" class="spec-border-ie" title="">.+?<img class="img-preview spec-border show-thumbnail"  src="http://www.thedarehub.com/tv/templates/svarog/timthumb.php[?]src=([^"]*?)&amp;w=130&amp;h=190&amp;zc=1" alt=" " />.+?<h5>.+?<a class="link" href=".+?" title=".+?">([^"]*?)</a>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait while Search is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Search Results loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for url,thumb,name in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-').replace('&#039;',"'")
                main.addDirTE(name,url,7,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Search Results loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait    

        nextpage=re.compile("<a href='([^>]+)' class='nextpostslink'>></a>").findall(link)
        for url in nextpage:
                name = '[COLOR green] Next Page -> [/COLOR]'
                main.addDir(name,url,220,'')
Esempio n. 7
0
def Episodes(url,name): ################# TV Episodes #################
        link=main.OPEN_URL(url)
        link=main.unescapes(link)
        match = re.findall('<a class="link" href="([^"]*?)" title=".+?">.+?(Episode[^"]*?)</a></h5>',link)
        for url,showtitle in match:
                name=main.unescapes(name)
                main.addDirTE("[COLOR yellow]"+name+" "+showtitle+"[/COLOR]",url,75,'','','','','','')
Esempio n. 8
0
def TV(url):
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match = re.findall('<div class="item"><a href="([^"]*)"><img alt=".+?" src="([^"]*)" /></a><div class="title"><a title="watch tv([^"]*)" href.+?class="year"> ([^"]*)</div>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Shows list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Shows loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for url,iconimage,name,date in match:
                main.addDirTE(name+' '+date,base_url+url,12,iconimage,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Shows loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        nextpage=re.compile('<a href="([^"]*)" class="next">Next &#187;</a>').findall(link)
        for url in nextpage:
                main.addDir('[COLOR aqua]'+'Next Page >>'+'[/COLOR]',base_url+url,11,art+'/next.jpg')
                
        xbmcplugin.setContent(int(sys.argv[1]), 'TV')
        main.VIEWS()
Esempio n. 9
0
def TVIndex2(url,name): ################# TV TAG Index #################
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
        match = re.findall('src="http://www.thedarewall.com/tv/templates/svarog/timthumb.php[?]src=([^"]*)&amp;w=[^"]*&amp;h=[^"]*&amp;zc=1" alt=" "/>            </a>                        </div>                <h5>                                <a class="link" href="([^"]*)" title="([^"]*)">[^"]*</a>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Tv Episodes Loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for thumb,url,name in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-')
                #main.addInfo(name,url,7,thumb,'','')
                main.addDirTE(name,url,7,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        nextpage=re.compile('<li><a href="([^"]*)">&raquo;</a></li> </ul></div><form method="post"').findall(link)
        for url in nextpage:
                main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,3,art+'/next.png')
                xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')                 
Esempio n. 10
0
def SEARCHTV(murl = '',index=False):
    encode = main.updateSearchFile(murl,'Shows')
    if not encode: return False   
    surl='http://megashare.li/index.php?search='+encode+'&tv=&x=0&y=0'
    link=main.OPENURL(surl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
    match=re.compile('class="item"><a href="([^"]*)"><img alt=".+?src="([^"]*)" /></a><div class="title"><a title="watch tv([^"]*)" href=".+?<div class="year"> ([^"]*)</div>').findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    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)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,thumb,name,date in match:
        name=name.replace('-','').replace('&','').replace('acute;','')
        furl= MainUrl+url
        main.addDirTE(name+'[COLOR blue] '+date +'[/COLOR]',furl,22,thumb,'','','','','')
        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(): return False 
    dialogWait.close()
    del dialogWait
    exist = re.findall('<a href="([^"]*)" class="next">Next &#187;</a>',link)
    if exist:
        main.addDir('[COLOR blue]Next Page ->[/COLOR]',MainUrl+url,15,art+'/next.jpg',index=index)
        
    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
Esempio n. 11
0
def TV(url):
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&#8211; ',' - ').replace('#038;','')
        match = re.findall('title="([^"]*)">[^"]*</a></h2><div class="capa"><a href="([^"]*html)"><img src="http://static.filmesonlinegratis.net/thumb.php[?]src=([^"]*)&amp;w=135&amp;h=185" alt="[^"]*" title="[^"]*" /></a>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Series list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Series loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for name,url,thumb in match:
                #main.addInfo(name,url,10,thumb,'','')
                main.addDirTE(name,str(url),6,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Series loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        
        
        nextpage=re.compile('href="([^"]*)">\xc2\xbb</a>').findall(link)
        for url in nextpage:
                main.addDir('[COLOR aqua]'+'Next Page >>'+'[/COLOR]',base_url+url,11,art+'/next.png')
                
        xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
        main.VIEWS()
Esempio n. 12
0
def TVIndex3(url,name): ################# TV Genre Index #################
        link=main.OPENURL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match = re.findall('<div class="view_img">.+?<a href="([^"]*?)" class="spec-border-ie" title="">.+?<img class="img-preview spec-border show-thumbnail"  src="([^"]*?)" alt=.+?class="link" href=".+?" title=".+?">([^"]*?)</a>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for url,thumb,name in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-')
                #main.addInfo(name,url,7,thumb,'','')
                main.addDirTE(name,url,7,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        nextpage=re.compile('<a href="([^"]*?)">&raquo;</a></li>             </ul>        </div>        <form method="post"').findall(link)
        for url in nextpage:
                main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,5,art+'/next.png')
                xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
Esempio n. 13
0
def SEARCHTV(murl='', index=False):
    encode = main.updateSearchFile(murl, 'Shows')
    if not encode: return False
    surl = 'http://megashare.li/index.php?search=' + encode + '&tv=&x=0&y=0'
    link = main.OPENURL(surl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile(
        'class="item"><a href="([^"]*)"><img alt=".+?src="([^"]*)" /></a><div class="title"><a title="watch tv([^"]*)" href=".+?<div class="year"> ([^"]*)</div>'
    ).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    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)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url, thumb, name, date in match:
        name = name.replace('-', '').replace('&', '').replace('acute;', '')
        furl = MainUrl + url
        main.addDirTE(name + '[COLOR blue] ' + date + '[/COLOR]', furl, 22,
                      thumb, '', '', '', '', '')
        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(): return False
    dialogWait.close()
    del dialogWait
    exist = re.findall('<a href="([^"]*)" class="next">Next &#187;</a>', link)
    if exist:
        main.addDir('[COLOR blue]Next Page ->[/COLOR]',
                    MainUrl + url,
                    15,
                    art + '/next.jpg',
                    index=index)

    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
Esempio n. 14
0
def List(url):
        link=main.OPEN_URL(url)
        match=re.compile('class="cover"><a href="([^"]*?)" rel="bookmark" title=".+?"><img src="([^"]*?)".+?alt="([^"]*?)" /></a>.+?class="postmetadata">([^"]*?)</p>').findall(link)
        if len(match) > 0:
         dialogWait = xbmcgui.DialogProgress()
         ret = dialogWait.create('Please wait until Show list is cached.')
         totalLinks = len(match)
         loadedLinks = 0
         remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
         dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
         for url,thumb,name,date in match:
            #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
            main.addDirTE(name+'[COLOR red] '+date+'[/COLOR]',url,865,thumb,'','','','','')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100)/totalLinks
            remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
            if (dialogWait.iscanceled()):
                return False   
         dialogWait.close()
         del dialogWait
        else:
         matchnew=re.compile('class="cover"><a href="([^"]*?)".+?<img src="([^"]*?)".+?alt="([^"]*?)"/>.+?class="postmetadata">([^"]*?)</p>').findall(link)       
         dialogWait = xbmcgui.DialogProgress()
         ret = dialogWait.create('Please wait until Show list is cached.')
         totalLinks = len(matchnew)
         loadedLinks = 0
         remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
         dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
         for url,thumb,name,date in matchnew:
            #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
            main.addDirTE(name+'[COLOR red] '+date+'[/COLOR]',url,865,thumb,'','','','','')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100)/totalLinks
            remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
            if (dialogWait.iscanceled()):
                return False   
        dialogWait.close()
        del dialogWait       
        paginate=re.compile('="nextpostslink" rel="next" href="([^"]*)">&raquo;</a>').findall(link)
        if paginate:
          xurl=paginate[0]         
          main.addDir('[COLOR blue]Next Page'+'[/COLOR]',xurl,860,art+'/next2.png') 
Esempio n. 15
0
def TV(url):
    link = main.OPENURL(url)
    link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace("&nbsp;", "")
    match = re.findall(
        '<a href="([^"]*)"><img alt="[^"]*" src="([^"]*)" /></a><div class="title"><a title="[^"]*" href="[^"]*">([^"]*)</a></div><ul class=\'star-rating\'><li class="current-rating" style="[^"]*"></li></ul><div class="item-genres"><a href="[^"]*">([^"]*)</a>',
        link,
    )
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create("Please wait until Shows list is cached.")
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = "Shows loaded :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
    dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display)
    for url, thumb, name, genre in match:
        main.addDirTE(
            "[COLOR green]" + name + "[/COLOR]" + "[COLOR blue] Genre: " + genre + "[/COLOR]",
            base_url + url,
            12,
            thumb,
            "",
            "",
            "",
            "",
            "",
        )
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = "Shows loaded :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
        dialogWait.update(percent, "[B]Will load instantly from now on[/B]", remaining_display)
        if dialogWait.iscanceled():
            return False
    dialogWait.close()
    del dialogWait

    nextpage = re.compile('<a href="([^"]*)" class="next">Next &#187;</a>').findall(link)
    for url in nextpage:
        main.addDir("[COLOR aqua]" + "Next Page >>" + "[/COLOR]", base_url + url, 11, art + "/next.png")

    xbmcplugin.setContent(int(sys.argv[1]), "TV")
    main.VIEWS()
Esempio n. 16
0
def TV(url):
    link = main.OPENURL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall(
        '<a href="([^"]*)"><img alt="[^"]*" src="([^"]*)" /></a><div class="title"><a title="[^"]*" href="[^"]*">([^"]*)</a></div><ul class=\'star-rating\'><li class="current-rating" style="[^"]*"></li></ul><div class="item-genres"><a href="[^"]*">([^"]*)</a>',
        link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Shows list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Shows loaded :: [B]' + str(loadedLinks) + ' / ' + str(
        totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    for url, thumb, name, genre in match:
        main.addDirTE(
            '[COLOR green]' + name + '[/COLOR]' + '[COLOR blue] Genre: ' +
            genre + '[/COLOR]', base_url + url, 12, thumb, '', '', '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Shows loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if (dialogWait.iscanceled()):
            return False
    dialogWait.close()
    del dialogWait

    nextpage = re.compile(
        '<a href="([^"]*)" class="next">Next &#187;</a>').findall(link)
    for url in nextpage:
        main.addDir('[COLOR aqua]' + 'Next Page >>' + '[/COLOR]',
                    base_url + url, 11, art + '/next.png')

    xbmcplugin.setContent(int(sys.argv[1]), 'TV')
    main.VIEWS()
Esempio n. 17
0
def TV(url):
    link = main.OPEN_URL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall(
        'class="item"><a href="([^"]*)"><img alt=".+?src="([^"]*)" /></a><div class="title"><a title="watch tv([^"]*)" href=".+?<div class="year"> ([^"]*)</div>',
        link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Shows list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Shows loaded :: [B]' + str(loadedLinks) + ' / ' + str(
        totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    for url, thumb, name, date in match:
        main.addDirTE(name + ' ' + date, MainUrl + url, 22, thumb, '', '', '',
                      '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Shows loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if (dialogWait.iscanceled()):
            return False
    dialogWait.close()
    del dialogWait

    nextpage = re.compile(
        '<a href="([^"]*)" class="next">Next &#187;</a>').findall(link)
    for url in nextpage:
        main.addDir('[COLOR aqua]' + 'Next Page >>' + '[/COLOR]',
                    MainUrl + url, 11, art + '/next.jpg')

    xbmcplugin.setContent(int(sys.argv[1]), 'TV')
    main.VIEWS()
Esempio n. 18
0
def Episodes(url,name): ################# TV Episodes #################
        link=main.OPEN_URL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
        match = re.findall('<img class="img-preview spec-border"  src="([^"]*?)" alt=" " style="background-color: #717171;"/>.+?<h5 class="left">.+?<a class="link" href="([^"]*?)" title="([^"]*?)">([^"]*?)</a></h5>',link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        for thumb,url,title,name in match:
                name=name.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','').replace('">'," ")
                main.addDirTE(title+' - '+name,url,75,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        
        xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
Esempio n. 19
0
def TV(url):
    link = main.OPEN_URL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('&#8211; ', ' - ').replace('#038;', '')
    match = re.findall(
        'title="([^"]*)">[^"]*</a></h2><div class="capa"><a href="([^"]*html)"><img src="http://static.filmesonlinegratis.net/thumb.php[?]src=([^"]*)&amp;w=135&amp;h=185" alt="[^"]*" title="[^"]*" /></a>',
        link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Series list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Series loaded :: [B]' + str(
        loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    for name, url, thumb in match:
        #main.addInfo(name,url,10,thumb,'','')
        main.addDirTE(name, str(url), 6, thumb, '', '', '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Series loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if (dialogWait.iscanceled()):
            return False
    dialogWait.close()
    del dialogWait

    nextpage = re.compile('href="([^"]*)">\xc2\xbb</a>').findall(link)
    for url in nextpage:
        main.addDir('[COLOR aqua]' + 'Next Page >>' + '[/COLOR]',
                    base_url + url, 11, art + '/next.png')

    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
    main.VIEWS()
Esempio n. 20
0
def SEARCH(mname,type,libID=''):
    if libID=='':
        main.GA("None","SuperSearch")
    else:
        libName=mname
        if re.search('(?i).\s\([12][90]\d{2}\)',mname):
            mname = re.sub('(?i)^(.+?)\s\([12][90]\d{2}\).*','\\1',mname)
        elif re.search('(?i).\s[12][90]\d{2}',mname):
            mname = re.sub('(?i)^(.+?)\s[12][90]\d{2}.*','\\1',mname)
        mname = re.sub('(?i)\s\s+',' ',mname).strip()
    try: import Queue as queue
    except ImportError: import queue
    results = []
    searchList=[]
    #mname=main.unescapes(mname)
    mname=main.removeColoredText(mname)
    if mname=='Search': mname=''
    encode = main.updateSearchFile(mname,type)
    if not encode: return False
    else:
        sources = []
        encodeunquoted = urllib.unquote(encode)
        encode = re.sub('(?i)[^a-zA-Z0-9]',' ',encodeunquoted)
        encode = re.sub('(?i)\s\s+',' ',encode).strip()
        try: year = int(re.sub('(?i)^.+?\s\(?([12][90]\d{2})\)?.*','\\1',mname))
        except: year = 0
        encodeorg = encode
        encode = re.sub('(?i)^(.+?)\s\(?[12][90]\d{2}\)?.*','\\1',encode)
        encode = urllib.quote(encode)
        if type=='Movies':
            if selfAddon.getSetting('ssm_iwatch') != 'false':
                sources.append('iWatchOnline')
                q = queue.Queue()
                threading.Thread(target=iwatch,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_movie25') != 'false':
                sources.append('Movie25')
                q = queue.Queue()
                threading.Thread(target=movie25,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_icefilms') != 'false':
                sources.append('IceFilms')
                q = queue.Queue()
                threading.Thread(target=icefilms,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_watchingnow') != 'false':
                sources.append('Watching Now')
                q = queue.Queue()
                threading.Thread(target=watchingnow,args=(encode,type,q)).start()
            if selfAddon.getSetting('ssm_filestube') != 'false':
                sources.append('FilesTube')
                q = queue.Queue()
                threading.Thread(target=filestube,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_mbox') != 'false':
                sources.append('MBox')
                q = queue.Queue()
                threading.Thread(target=mbox,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_yify') != 'false':
                sources.append('Yify')
                q = queue.Queue()
                threading.Thread(target=yify,args=(encode,type,q)).start()
                results.append(q)
#             if selfAddon.getSetting('ssm_noobroom') != 'false':
#                 if selfAddon.getSetting('username') != '' and selfAddon.getSetting('password') != '':
#                     sources.append('NoobRoom')
#                     q = queue.Queue()
#                     threading.Thread(target=noobroom,args=(encode,type,q)).start()
#                     results.append(q)
            if selfAddon.getSetting('ssm_tubeplus') != 'false':
                sources.append('TubePlus')
                q = queue.Queue()
                threading.Thread(target=tubeplus,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_tvrelease') != 'false':
                sources.append('TVRelease')
                q = queue.Queue()
                threading.Thread(target=tvrelease,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_mynewvideolinks') != 'false':
                sources.append('MyNewVideoLinks')
                q = queue.Queue()
                threading.Thread(target=mynewvideolinks,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_sceper') != 'false':
                sources.append('Sceper')
                q = queue.Queue()
                threading.Thread(target=sceper,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_fma') != 'false':
                sources.append('FMA')
                q = queue.Queue()
                threading.Thread(target=fma,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_scenesource') != 'false':
                sources.append('SceneSource')
                q = queue.Queue()
                threading.Thread(target=scenesource,args=(encode,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('ssm_vip') != 'false':
                sources.append('VIP')
                q = queue.Queue()
                threading.Thread(target=vip,args=(encode,type,q)).start()
                results.append(q)
#             if selfAddon.getSetting('ssm_rls1click') != 'false':
#                 sources.append('Rls1Click')
#                 q = queue.Queue()
#                 threading.Thread(target=rls1click,args=(encode,type,q)).start()

        else:
            encodetv = urllib.quote(re.sub('(?i)^(.*?((\ss(\d+)e(\d+))|(Season(.+?)Episode \d+)|(\d+)x(\d+))).*','\\1',urllib.unquote(encode)))
            encodewithoutepi = urllib.quote(re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)','',urllib.unquote(encodetv)).strip())
            print encodetv
            if selfAddon.getSetting('sstv_mbox') != 'false':
                sources.append('MBox')
                q = queue.Queue()
                threading.Thread(target=mbox,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_watchseries') != 'false':
                sources.append('WatchSeries')
                q = queue.Queue()
                threading.Thread(target=watchseries,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_iwatch') != 'false':
                sources.append('iWatchOnline')
                q = queue.Queue()
                threading.Thread(target=iwatch,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_pftv') != 'false':
                sources.append('PFTV')
                q = queue.Queue()
                threading.Thread(target=pftv,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_icefilms') != 'false':
                sources.append('IceFilms')
                q = queue.Queue()
                threading.Thread(target=icefilms,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_tubeplus') != 'false':
                sources.append('TubePlus')
                q = queue.Queue()
                threading.Thread(target=tubeplus,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_tvrelease') != 'false':
                sources.append('TVRelease')
                q = queue.Queue()
                threading.Thread(target=tvrelease,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_mynewvideolinks') != 'false':
                sources.append('MyNewVideoLinks')
                q = queue.Queue()
                threading.Thread(target=mynewvideolinks,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_rlsmix') != 'false':
                if selfAddon.getSetting('rlsusername') != '' and selfAddon.getSetting('rlspassword') != '':
                    sources.append('Rlsmix')
                    q = queue.Queue()
                    threading.Thread(target=rlsmix,args=(encodetv,type,q)).start()
                    results.append(q)
            if selfAddon.getSetting('sstv_scenelog') != 'false':
                sources.append('SceneLog')
                q = queue.Queue()
                threading.Thread(target=scenelog,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_sceper') != 'false':
                sources.append('Sceper')
                q = queue.Queue()
                threading.Thread(target=sceper,args=(encodetv,type,q)).start()
                results.append(q)
            if selfAddon.getSetting('sstv_scenesource') != 'false':
                sources.append('SceneSource')
                q = queue.Queue()
                threading.Thread(target=scenesource,args=(encodetv,type,q)).start()
                results.append(q)

            encodewithoutepi = urllib.unquote(encodewithoutepi)
        encode = urllib.unquote(encode)
        if libID=='':
            dialogWait = xbmcgui.DialogProgress()
            ret = dialogWait.create('Please wait. Super Search is searching...')
            loadedLinks = 0
            remaining_display = 'Sources searched :: [B]'+str(loadedLinks)+' / '+str(len(results))+'[/B].'
            dialogWait.update(0,'[B]'+type+' Super Search - ' + encodeunquoted + '[/B]',remaining_display)
            totalLinks = len(results)
            whileloopps = 0
            xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
            while totalLinks > loadedLinks:
                for n in range(len(results)):
                    try:
                        searchList.extend(results[n].get_nowait())
                        loadedLinks += 1
                        percent = (loadedLinks * 100)/len(results)
                        remaining_display = 'Sources searched :: [B]'+str(loadedLinks)+' / '+str(len(results))+'[/B].'
                        dialogWait.update(percent,'[B]'+type+' Super Search - ' + encodeunquoted + '[/B]',remaining_display,sources[n] + ' finished searching')
                        if dialogWait.iscanceled(): break;
                    except: pass
                if dialogWait.iscanceled(): break;
                time.sleep(.1)
            ret = dialogWait.create('Please wait until Video list is cached.')
            totalLinks = len(searchList)
            loadedLinks = 0
            remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display,' ')
            searchList = sortSearchList(searchList,mname)

        if not libID=='':
            for n in range(len(results)):
                searchList.extend(results[n].get())
            searchList = sortSearchList(searchList,mname)
            import library
            t=threading.Thread(target=library.buildHostDB,args=(searchList,libID,libName))
            t.start()
            t.join()
            
        else:
            encode = encodeorg
            if type == 'TV':
                wordsalt = set(encodewithoutepi.lower().split())
                encode = urllib.unquote(encodetv)
            wordsorg = set(encode.lower().split())
            for name,section,url,thumb,mode,dir in searchList:
                name = name.replace('&rsquo;',"'").replace('&quot;','"').strip()
                cname = re.sub('(?i)[^a-zA-Z0-9]',' ',name)
                try: cyear = int(re.sub('(?i)^.+?\s\(?([12][90]\d{2})\)?.*','\\1',cname))
                except: cyear = 0 
                if year and not re.search('(?i)^.+?\s\(?([12][90]\d{2})\)?.*',cname): cname += ' ' + str(year)
                elif (cyear + 1) == year or (cyear - 1) == year: cname = cname.replace(str(cyear),str(year))
                name = name +' [COLOR=FF67cc33]'+section+'[/COLOR]'
                if type == 'TV' and (section == 'MBox' or section == 'WatchSeries' or section == 'iWatchOnline' or section == 'IceFilms' or section == 'TubePlus'):
                    words = wordsalt
                else: words = wordsorg
                if words.issubset(cname.lower().split()):
                    if dir:
                        if type=='Movies':
                            main.addDirM(name,url,int(mode),thumb,'','','','','')
                        else:
                            if re.search('(?i)\ss(\d+)e(\d+)',name) or re.search('(?i)Season(.+?)Episode',name) or re.search('(?i)(\d+)x(\d+)',name):
                                main.addDirTE(name,url,int(mode),thumb,'','','','','')
                            else:
                                main.addDirT(name,url,int(mode),thumb,'','','','','')
                    else:
                        if type=='Movies':
                            main.addPlayM(name,url,int(mode),thumb,'','','','','')
                        else:
                            if re.search('(?i)\ss(\d+)e(\d+)',name) or re.search('(?i)Season(.+?)Episode',name) or re.search('(?i)(\d+)x(\d+)',name):
                                main.addPlayTE(name,url,int(mode),thumb,'','','','','')
                            else:
                                main.addPlayT(name,url,int(mode),thumb,'','','','','')
                    loadedLinks = loadedLinks + 1
                    percent = (loadedLinks * 100)/totalLinks
                    remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                    dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                    if dialogWait.iscanceled(): return False    
            dialogWait.close()
            del dialogWait
            if type=='Movies':
                xbmcgui.Window(10000).setProperty('MASH_SSR_TYPE', '2')
            elif type == 'TV':
                xbmcgui.Window(10000).setProperty('MASH_SSR_TYPE', '1')
            try:
                filelist = [ f for f in os.listdir(cachedir) if f.endswith(".fi") ]
                for f in filelist: os.remove(os.path.join(cachedir,f))
            except:pass
            if not loadedLinks:
                xbmc.executebuiltin("XBMC.Notification(Super Search - "+encode.replace("%20"," ")+",No Results Found,3000)")
                xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False) 
                return False
Esempio n. 21
0
def List(url):
    link = main.OPEN_URL(url)
    match = re.compile(
        'class="cover"><a href="([^"]*?)" rel="bookmark" title=".+?"><img src="([^"]*?)".+?alt="([^"]*?)" /></a>.+?class="postmetadata">([^"]*?)</p>'
    ).findall(link)
    if len(match) > 0:
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Episodes loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        for url, thumb, name, date in match:
            #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
            main.addDirTE(name + '[COLOR red] ' + date + '[/COLOR]', url, 865,
                          thumb, '', '', '', '', '')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100) / totalLinks
            remaining_display = 'Episodes loaded :: [B]' + str(
                loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
            dialogWait.update(percent,
                              '[B]Will load instantly from now on[/B]',
                              remaining_display)
            if (dialogWait.iscanceled()):
                return False
        dialogWait.close()
        del dialogWait
    else:
        matchnew = re.compile(
            'class="cover"><a href="([^"]*?)".+?<img src="([^"]*?)".+?alt="([^"]*?)"/>.+?class="postmetadata">([^"]*?)</p>'
        ).findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(matchnew)
        loadedLinks = 0
        remaining_display = 'Episodes loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        for url, thumb, name, date in matchnew:
            #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','')
            main.addDirTE(name + '[COLOR red] ' + date + '[/COLOR]', url, 865,
                          thumb, '', '', '', '', '')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100) / totalLinks
            remaining_display = 'Episodes loaded :: [B]' + str(
                loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
            dialogWait.update(percent,
                              '[B]Will load instantly from now on[/B]',
                              remaining_display)
            if (dialogWait.iscanceled()):
                return False
    dialogWait.close()
    del dialogWait
    paginate = re.compile(
        '="nextpostslink" rel="next" href="([^"]*)">&raquo;</a>').findall(link)
    if paginate:
        xurl = paginate[0]
        main.addDir('[COLOR blue]Next Page' + '[/COLOR]', xurl, 860,
                    art + '/next2.png')
Esempio n. 22
0
def SEARCH(mname,type):
    main.GA("None","SuperSearch")
    try: import Queue as queue
    except ImportError: import queue
    results = []
    searchList=[]
    #mname=main.unescapes(mname)
    mname=main.removeColoredText(mname)
    if mname=='Search': mname=''
    encode = main.updateSearchFile(mname,type)
    if not encode: return False
    else:
        encode = encode.replace('%21','')
        if type=='Movies':
            q = queue.Queue()
            threading.Thread(target=iwatch,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=movie25,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=icefilms,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=watchingnow,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=mbox,args=(encode,type,q)).start()
            results.append(q)
            if selfAddon.getSetting('username') != '' and selfAddon.getSetting('password') != '':
                q = queue.Queue()
                threading.Thread(target=noobroom,args=(encode,type,q)).start()
                results.append(q)
            q = queue.Queue()
            threading.Thread(target=tubeplus,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=tvrelease,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=mynewvideolinks,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=sceper,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=fma,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=scenesource,args=(encode,type,q)).start()
            results.append(q)
        else:
            encodewithoutepi = urllib.quote(re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)','',urllib.unquote(encode)).strip())
            q = queue.Queue()
            threading.Thread(target=mbox,args=(encodewithoutepi,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=watchseries,args=(encodewithoutepi,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=iwatch,args=(encodewithoutepi,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=icefilms,args=(encodewithoutepi,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=tubeplus,args=(encodewithoutepi,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=tvrelease,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=mynewvideolinks,args=(encode,type,q)).start()
            results.append(q)
            if selfAddon.getSetting('rlsusername') != '' and selfAddon.getSetting('rlspassword') != '':
                q = queue.Queue()
                threading.Thread(target=rlsmix,args=(encode,type,q)).start()
                results.append(q)
            q = queue.Queue()
            threading.Thread(target=scenelog,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=sceper,args=(encode,type,q)).start()
            results.append(q)
            q = queue.Queue()
            threading.Thread(target=scenesource,args=(encode,type,q)).start()
            results.append(q)
        for n in range(len(results)):
            searchList.extend(results[n].get())
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Video list is cached.')
        totalLinks = len(searchList)
        loadedLinks = 0
        remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
        searchList = sortSearchList(searchList,mname)
        wordsorg = set(encode.lower().split("%20"))
        if type == 'TV':
            wordsalt = set(encodewithoutepi.lower().split("%20"))
        for name,section,url,thumb,mode,dir in searchList:
            name = name.strip()+' [COLOR=FF67cc33]'+section+'[/COLOR]'
            name = name.replace('&rsquo;',"'").replace('&quot;','"')
            if type == 'TV' and (section == 'MBox' or section == 'WatchSeries' or section == 'iWatchOnline' or section == 'IceFilms' or section == 'TubePlus'):
                words = wordsalt
            else: words = wordsorg
            if words.issubset(name.lower().split()):
                if dir:
                    if type=='Movies':
                        main.addDirM(name,url,int(mode),thumb,'','','','','')
                    else:
                        if re.search('(?i)\ss(\d+)e(\d+)',name) or re.search('(?i)Season(.+?)Episode',name) or re.search('(?i)(\d+)x(\d+)',name):
                            main.addDirTE(name,url,int(mode),thumb,'','','','','')
                        else:
                            main.addDirT(name,url,int(mode),thumb,'','','','','')
                else:
                    if type=='Movies':
                        main.addPlayM(name,url,int(mode),thumb,'','','','','')
                    else:
                        if re.search('(?i)\ss(\d+)e(\d+)',name) or re.search('(?i)Season(.+?)Episode',name) or re.search('(?i)(\d+)x(\d+)',name):
                            main.addPlayTE(name,url,int(mode),thumb,'','','','','')
                        else:
                            main.addPlayT(name,url,int(mode),thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if dialogWait.iscanceled(): return False    
        dialogWait.close()
        del dialogWait
        if type=='Movies':
            xbmcgui.Window(10000).setProperty('MASH_SSR_TYPE', '2')
        else: xbmcgui.Window(10000).setProperty('MASH_SSR_TYPE', '1')
        try:
            filelist = [ f for f in os.listdir(cachedir) if f.endswith(".fi") ]
            for f in filelist: os.remove(os.path.join(cachedir,f))
        except:pass
        if not loadedLinks:
            xbmc.executebuiltin("XBMC.Notification(Super Search - "+encode.replace("%20"," ")+",No Results Found,3000)")
            xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False) 
            return False