예제 #1
0
def iWatchLISTMOVIES(murl):
        main.GA("Movies","List")   
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
        match=re.compile('<li.+?<a.+?href=\"(.+?)\".+?<img.+?src=\"(.+?)\".+?<div class=\"title.+?>(.+?)<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)
        for url,thumb,name in match:    
                main.addDirIWO(name,url,588,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
        if len(match)==25:
            paginate=re.compile('([^<]+)start=([^<]+)').findall(murl)
            for purl,page in paginate:
                i=int(page)+25
                pg=(int(page)/25)+2
                if pg >2:
                    main.addDir('[COLOR red]Home[/COLOR]','',2000,art+'/home.png')
                main.addDir('[COLOR blue]Page '+ str(pg)+'[/COLOR]',purl+'start='+str(i),587,art+'/next2.png')
                main.addDir('[COLOR red]Enter Page #[/COLOR]',murl,654,art+'/gotopage.png')
        xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
        main.VIEWS()
예제 #2
0
파일: iwatchonline.py 프로젝트: noba3/KoTos
def iWatchLISTMOVIES(murl, index=False):
    main.GA("Movies", "List")
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    videos = re.search('<ul class="thumbnails">(.+?)</ul>', link)
    if videos:
        videos = videos.group(1)
        match = re.compile(
            '<li.+?<a.+?href=\"(.+?)\".+?<img.+?src=\"(.+?)\".+?<div class=\"title.+?>(.+?)<div'
        ).findall(videos)
        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 in match:
            if index == 'True':
                main.addDirIWO(name, url, 21, thumb, '', '', '', '', '')
            else:
                main.addDirIWO(name, url, 588, 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()): break
        dialogWait.close()
        del dialogWait
        if len(match) == 25 and loadedLinks == 25:
            print "poooooooooooooop" + murl
            paginate = re.compile('(http://.+?&)p=(\d+)').findall(murl)
            for purl, page in paginate:
                i = int(page) + 25
                pg = (int(page) / 25) + 2
                #                 if pg >2:
                #                     main.addDir('[COLOR red]Home[/COLOR]','',2000,art+'/home.png')
                main.addDir('[COLOR red]Enter Page #[/COLOR]',
                            murl,
                            654,
                            art + '/gotopage.png',
                            index=index)
                main.addDir('[COLOR blue]Page ' + str(pg) + '[/COLOR]',
                            purl + 'p=' + str(i),
                            587,
                            art + '/next2.png',
                            index=index)
        xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
        main.VIEWS()
예제 #3
0
def iWatchLISTMOVIES(murl,index=False):
    main.GA("Movies","List")   
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
    videos = re.search('<ul class="thumbnails">(.+?)</ul>', link)
    if videos:
        videos = videos.group(1)
        match=re.compile('<li.+?<a.+?href=\"(.+?)\".+?<img.+?src=\"(.+?)\".+?<div class=\"title.+?>(.+?)<div').findall(videos)
        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 in match:
            if index == 'True':
                main.addDirIWO(name,url,21,thumb,'','','','','')
            else:
                main.addDirIWO(name,url,588,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()): break 
        dialogWait.close()
        del dialogWait
        if len(match)==25 and loadedLinks == 25:
            print "poooooooooooooop"+murl
            paginate=re.compile('(http://.+?&)p=(\d+)').findall(murl)
            for purl,page in paginate:
                i=int(page)+25
                pg=(int(page)/25)+2
    #                 if pg >2:
    #                     main.addDir('[COLOR red]Home[/COLOR]','',2000,art+'/home.png')
                main.addDir('[COLOR red]Enter Page #[/COLOR]',murl,654,art+'/gotopage.png',index=index)
                main.addDir('[COLOR blue]Page '+ str(pg)+'[/COLOR]',purl+'p='+str(i),587,art+'/next2.png',index=index)
        xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
        main.VIEWS()