Beispiel #1
0
def ESPNList(murl):
    link = main.OPENURL(murl)
    match = re.compile(
        '"videoDuration":"(.+?)",.+?"video":.+?{"headline":"(.+?)",.+?,"includePlatforms":.+?,"imageUrl":"(.+?)","mobileSubHead":"(.+?)","internalUrl720p":"(.+?)",'
    ).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Sports list is loaded.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Videos loaded :: [B]' + str(
        loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Loading....[/B]', remaining_display)
    for dur, name, thumb, desc, url, in match:
        dur = dur.replace('00:', '')
        main.addPlayMs(name, url, 46, thumb, desc, '', dur, '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Videos loaded :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Loading....[/B]', remaining_display)
        if (dialogWait.iscanceled()):
            return False
    dialogWait.close()
    del dialogWait
    main.GA("ESPN", "ESPN-List")
Beispiel #2
0
def WILDTV(murl):
    main.GA("Sports", "Wildtv")
    link = main.OPENURL(murl)
    match = re.compile('<option value="(.+?)">(.+?)</option>').findall(link)
    for idnum, name in match:
        url = 'https://www.wildtv.ca/show/' + idnum
        main.addDir(name, url, 93, art + '/wildtv.png')
Beispiel #3
0
def iWatchLISTMOVIES(murl):
        main.GA("Movies","List")   
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        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()
Beispiel #4
0
def LISTNG2(murl):
    MainUrl = 'http://video.nationalgeographic.com'
    link = main.OPENURL(murl)
    match2 = re.compile(
        'http://video.nationalgeographic.com/video/animals').findall(murl)
    match3 = re.compile(
        'http://video.nationalgeographic.com/video/kids').findall(murl)
    match = re.compile(
        '<a href="(.+?)" title="(.+?)"><img src="(.+?)"></a>').findall(link)
    for url, name, thumb in match:
        name = name.replace("&#39;", "'").replace('&lt;i&gt;', '').replace(
            '&lt;/i&gt;', '').replace('&quot;',
                                      '"').replace('&amp;quot;',
                                                   '"').replace('&amp;', '&')
        if (len(match2) == 0) and (len(match3) == 0):
            main.addPlayMs(name, MainUrl + url, 74, MainUrl + thumb, '', '',
                           '', '', '')
        else:
            main.addPlayMs(name, MainUrl + url, 75, MainUrl + thumb, '', '',
                           '', '', '')
    paginate = re.compile(
        """\n            if ((.+?) === (.+?)) .+?\n                .+?<li><a href="(.+?)">Next &raquo;</a></li>"""
    ).findall(link)
    if (len(paginate) > 0):
        for pges, pg, pgtot, purl in paginate:
            pg = pg.replace('(', '')
            pgtot = pgtot.replace(')', '')
            if pgtot != pg:
                main.addDir('Page ' + str(int(pg) + 1),
                            MainUrl + purl + pg + '/', 73, art + '/next2.png')
    main.GA("NG-Show", "List")
Beispiel #5
0
def SEARCHEXTRA(murl):
    seapath = os.path.join(main.datapath, 'Search')
    SeaFile = os.path.join(seapath, 'SearchHistory25')
    try:
        os.makedirs(seapath)
    except:
        pass
    if murl == 'extra':
        keyb = xbmc.Keyboard('', 'Search Movies')
        keyb.doModal()
        if (keyb.isConfirmed()):
            search = keyb.getText()
            encode = urllib.quote(search)
            surl = 'http://www.watching-now.com/search?q=' + encode + '&x=-911&y=-656'
            if not os.path.exists(SeaFile) and encode != '':
                open(SeaFile, 'w').write('search="%s",' % encode)
            else:
                if encode != '':
                    open(SeaFile, 'a').write('search="%s",' % encode)
            searchis = re.compile('search="(.+?)",').findall(
                open(SeaFile, 'r').read())
            for seahis in reversed(searchis):
                continue
            if len(searchis) >= 10:
                searchis.remove(searchis[0])
                os.remove(SeaFile)
                for seahis in searchis:
                    try:
                        open(SeaFile, 'a').write('search="%s",' % seahis)
                    except:
                        pass
    else:
        encode = murl
        surl = 'http://www.watching-now.com/search?q=' + encode + '&x=-911&y=-656'
    link = main.OPENURL(surl)
    link = link.replace('\xc2\xa0', '').replace('\n', '')
    match = re.compile(
        """<h3 class='post-title entry-title'><a href='([^<]+)'>(.+?)</a>.+?src="(.+?)".+?""",
        re.DOTALL).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, name, thumb in match:
        main.addPlayM(name, url, 536, 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
    main.GA("Watching Now", "Search")
Beispiel #6
0
def LISTSHOWWATCHS(murl):
        main.GA("Watchseries","List")
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','')
        match=re.compile('<a title="(.+?)" href="(.+?)">.+?<span class="epnum">(.+?)</span></a>').findall(link)
        for name, url, year in match:
            main.addDirT(name,'http://watchseries.lt'+url,578,'','','','','','')
Beispiel #7
0
def LIST2(mname,murl,thumb,desc):
        main.GA("AnimeFreak","List")
        link=main.OPENURL(murl)
        link=main.unescapes(link)
        match = re.compile("""onClick="javascript:loadParts.?\'(.+?)', \'\'.?" class="multi">(.+?)</a>""").findall(link)
        
        if len(match)==0:
            match = re.compile('<iframe .+?src="(.+?)".+?/iframe>').findall(link)
            for url in match:
                host=re.compile("http://(.+?).?/.+?").findall(url)
                for hname in host:
                        name=hname.replace('www.','').replace('embed.','').replace('.co','').replace('.t','').replace('.e','')
                main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','')
        else:
            for url, name in match:
                    match2 = re.compile('<iframe(.+?)/iframe>').findall(url)
                    if len(match2)>=2:
                            for url in match2:
                                match = re.compile('src="(.+?)"').findall(url)
                                if len(match)==0:
                                    match = re.compile("src='(.+?)'").findall(url)
                                for url in match:
                                        host=re.compile("http://(.+?).?/.+?").findall(url)
                                        for hname in host:
                                                name=hname.replace('www.','').replace('embed.','').replace('.co','').replace('.t','').replace('.e','')
                                                main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','')
                    
                    main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','')
Beispiel #8
0
def setCookie(srDomain):
    from t0mm0.common.net import Net as net
    cookieExpired = False
    if os.path.exists(cookie_file):
        try:
            cookie = open(cookie_file).read()
            expire = re.search('expires="(.*?)"', cookie, re.I)
            if expire:
                expire = str(expire.group(1))
                import time
                if time.time() > time.mktime(
                        time.strptime(expire, '%Y-%m-%d %H:%M:%SZ')):
                    cookieExpired = True
        except:
            cookieExpired = True
        loggedin = re.search('SrLoggedIn', cookie, re.I)
    if not os.path.exists(cookie_file) or cookieExpired or (not loggedin
                                                            and user != ''
                                                            and passw != ''):
        link = main.OPENURL(srDomain + '/sign_in')
        match = re.findall('<meta content="([^<]+)" name="csrf-token" />',
                           link, re.DOTALL)
        token = match[0]
        net().http_GET(srDomain + '/sign_in')
        net().http_POST(
            srDomain + '/sign_in', {
                'authenticity_token': token,
                'user[email]': user,
                'user[password]': passw
            })
        net().save_cookies(cookie_file)
    else:
        net().set_cookies(cookie_file)
Beispiel #9
0
def playlistList3(mname, murl):
    main.GA("Playlists-" + mname, "Watched")
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace(
            'type=playlistname=Sorted by user-assigned order', '').replace(
                'name=Sorted [COLOR=FF00FF00]by user-assigned order[/COLOR]',
                '').replace('name=Live Tv Channels Twothumb', '')
    match = re.compile('name=(.+?)thumb=(.+?)date=.+?URL=(.+?)#').findall(link)
    for name, thumb, url in match:
        match2 = re.compile('http://(.+?)URL').findall(thumb)
        if len(match2) > 0:
            thumb = 'http://' + match2[0]
        url = url.replace('player=defaultrating=-1.00', '')
        match3 = re.compile('rtmp').findall(url)
        match4 = re.compile('timeout').findall(url)
        if len(match3) > 0 and len(match4) == 0:
            url = url + ' timeout=15'
        main.addLink(name, url, thumb)
    match = re.compile('name=(.+?)thumb=(.+?)URL=(.+?)#').findall(link)
    for name, thumb, url in match:
        match2 = re.compile('http://(.+?)URL').findall(thumb)
        if len(match2) > 0:
            thumb = 'http://' + match2[0]
        url = url.replace('player=defaultrating=-1.00',
                          '').replace('%20',
                                      ' ').replace('player=default', '')
        match3 = re.compile('rtmp').findall(url)
        match4 = re.compile('timeout').findall(url)
        if len(match3) > 0 and len(match4) == 0:
            url = url + ' timeout=15'
        main.addLink(name, url, thumb)
Beispiel #10
0
def LIST(murl):
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace("type='text'>Pencuri Movie</title>", '')
    match = re.compile(
        """<title type='text'>([^<]+)</title><.+?>.+?div class=".+?" style=".+?".+?href="(.+?)" imageanchor=".+?" .+?href='.+?'.+?href='([^<]+).html' title='.+?'/><author>"""
    ).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 name, thumb, url in match:
        f = re.findall('One Piece', name)
        r = re.findall('Streaming', name)
        if len(f) == 0 and len(r) == 0:
            main.addPlayM(name, url + '.html', 216, 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
    main.GA("HD", "Pencurimovie")
Beispiel #11
0
def ESPNList(murl):
        
        if 'http://espn.go.com/video/' in murl:
                lurl=murl
                xurl=re.findall('(.+?)&pageNum=',murl)[0]
        else:
                lurl='http://espn.go.com/video/format/libraryPlaylist?categoryid='+murl
                xurl='http://espn.go.com/video/format/libraryPlaylist?categoryid='+murl
        link=main.OPENURL(lurl)
        match=re.compile('<a href="([^<]+)"><img src="(.+?)".+?></a><h5>(.+?)</h5>',re.DOTALL).findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Sports list is loaded.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Loading....[/B]',remaining_display)
        for url,thumb,name in match:
                main.addPlayMs(name,url,46,thumb,'','','','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Loading....[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        match=re.compile('class="page-numbers">(\d+) of (\d+)</div>',re.DOTALL).findall(link)
        for p1,p2 in match:
                continue
        if p1 != p2:
                purl=xurl+ "&pageNum=" + str(int(p1)) + "&sortBy=&assetURL=http://assets.espn.go.com&module=LibraryPlaylist&pagename=vhub_index"
                main.addDir('[COLOR blue]Next[/COLOR]   Page '+p1+' of '+p2,purl,45,art+'/next2.png')
        main.GA("ESPN","ESPN-List")
Beispiel #12
0
def TubTubLink(mname, murl):
    main.GA("TubTub-" + mname, "Watched")
    ok = True
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile("Ref2=([^<]+)").findall(link)
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    stream_url = match[0]
    listitem = xbmcgui.ListItem(mname)

    playlist.add(stream_url, listitem)
    xbmcPlayer = xbmc.Player()
    xbmcPlayer.play(playlist)
    #WatchHistory
    if selfAddon.getSetting("whistory") == "true":
        wh.add_item(mname + ' ' + '[COLOR green]TubTub[/COLOR]',
                    sys.argv[0] + sys.argv[2],
                    infolabels='',
                    img='',
                    fanart='',
                    is_folder=False)
    return ok
Beispiel #13
0
def LIST(murl):
        main.addLink('[COLOR red]Not the best source, but some links work in HSBS[/COLOR]','mess',art+'/link.png')
        main.addLink('[COLOR red]Try to avoid the same Hosts that are in groups of 4, possible rar files[/COLOR]','mess',art+'/link.png')
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        link=main.unescapes(link)
        match=re.compile('''entry-title'><a href='(.+?)'>.+?<img alt="(.+?)" src="(.+?)"''').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,name,thumb in match:
                name=name.replace('Download ','').replace('" height="400','')
                main.addPlayM(name,url,225,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
        paginate=re.compile("""<a class='blog-pager-older-link' href='(.+?)' id='.+?' title='.+?'>Next.+?</a>""").findall(link)
        if (len(paginate)>0):
            for purl in paginate:
                main.addDir('[COLOR blue]Next[/COLOR]',purl,224,art+'/next2.png')
Beispiel #14
0
def NovaWeed(murl):
    link = main.OPENURL(murl)
    link = main.unescapes(link)
    vw = re.compile('flashvars.advURL="(.+?)";').findall(link)
    vid_url = vw[0]
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
    return main.resolve_url(vid_url)
Beispiel #15
0
def LIST(murl):
    main.GA("DocumentaryWire", "List")
    link = main.OPENURL(murl)
    link = main.unescapes(link)
    r = re.findall(
        """<div class="loop-content switchable-view grid-small" data-view="grid-small">(.+?)<div class=\'wp-pagenavi\'>""",
        link)
    if r:
        match = re.compile(
            '<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
        ).findall(r[0])
    else:
        match = re.compile(
            '<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
        ).findall(link)
    for name, url, thumb, desc in match:
        main.addPlayMs(name, url, 228, thumb, desc, '', '', '', '')
    paginate = re.compile(
        """'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>"""
    ).findall(link)
    if (len(paginate) == 0):
        paginate = re.compile(
            """<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>"""
        ).findall(link)
    if (len(paginate) > 0):
        for purl in paginate:
            main.addDir('[COLOR blue]Next[/COLOR]', purl, 227,
                        art + '/next2.png')
Beispiel #16
0
def LISTNG(murl):
    MainUrl='http://video.nationalgeographic.com'
    link=main.OPENURL(murl)
    match=re.compile('<a href="(.+?)">More \xc2\xbb</a></p><h3>(.+?)\n        \n    </h3><ul class=".+?"><li><a class=".+?" href=".+?" title=".+?"><img src="(.+?)">').findall(link)
    for url, name, thumb in match:
            main.addDir(name,MainUrl+url,73,MainUrl+thumb)
    main.GA("NationalGeo","NG-Show")
Beispiel #17
0
def LINKSP4(mname, murl):
    xbmc.executebuiltin(
        "XBMC.Notification(Please Wait!,Collecting Hosts,3000)")
    link = main.OPENURL(murl)
    ok = True
    link = link.replace('href="http://oneclickmoviez.com/dws/MEGA', '')
    main.addLink(
        "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
        '', '')
    match = re.compile(
        '<a href="(.+?)" target="_blank">(.+?)</a>.+?</p>').findall(link)
    for url, host in match:
        thumb = host.lower()
        thumb = thumb.replace('www.', '').replace('.in', '').replace(
            '.net', '').replace('.com',
                                '').replace('.to',
                                            '').replace('.org',
                                                        '').replace('.ch', '')
        vlink = getlink(url)
        match2 = re.compile('rar').findall(vlink)
        if len(match2) == 0:
            hosted_media = urlresolver.HostedMediaFile(url=vlink, title=host)
            match2 = re.compile(
                "{'url': '(.+?)', 'host': '(.+?)', 'media_id': '.+?'}"
            ).findall(str(hosted_media))
            for murl, name in match2:
                main.addDown2(mname + ' [COLOR blue]' + host + '[/COLOR]',
                              murl, 211, art + '/hosts/' + thumb + ".png",
                              art + '/hosts/' + thumb + ".png")
Beispiel #18
0
def CastalbaList(murl):
        try:
            urllist=['http://castalba.tv/channels/p=1','http://castalba.tv/channels/p=2']
        except:
            urllist=['http://castalba.tv/channels/p=1','http://castalba.tv/channels/p=2']
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until channel list is loaded.')
        totalLinks = len(urllist)
        loadedLinks = 0
        remaining_display = 'Pages loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Loading.....[/B]',remaining_display)
        for durl in urllist:
                link=main.OPENURL(durl)
                link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
                match=re.compile('<li><div class=".+?"><a href=".+?"><img src="(.+?)" alt=""/><.+?><a href=".+?class=".+?" href="(.+?)">(.+?)</a></h4>.+?<a href=".+?" class=".+?">(.+?)</a></p></li>').findall(link)
                for thumb,url,name,section in match:
                    if name != 'Playboy TV':
                        url=url.replace('..','')
                        thumb=thumb.replace('..','')
                        main.addPlayL(name+'   [COLOR red]'+section+'[/COLOR]','http://castalba.tv'+url,123,'http://castalba.tv'+thumb,'','','','','',secName='Castalba',secIcon=art+'/castalba.png')

                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Pages loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Loading.....[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        main.GA("Castalba","List")
Beispiel #19
0
def LISTWATCHSEASON(mname, murl):
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','')
        thumb=art+'/folder.png'
        match=re.compile('<a class="null" href="(.+?)">(.+?)</a>').findall(link)
        for url, name in reversed(match):
            main.addDir(mname+'   [COLOR red]'+name+'[/COLOR]','http://watchseries.lt'+url,579,thumb)
Beispiel #20
0
def MUSICLIST(mname, murl):
    link = main.OPENURL(murl, ua=useragent)
    fan = re.findall('"banner":"(.+?)",', link, re.DOTALL)[0]
    match = re.findall(
        '{"id":".+?","link":"(.+?)","name":"(.+?)","year":"(.+?)","pic":"(.+?)"}',
        link, re.DOTALL)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Song list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Songs Cached :: [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, name, year, thumb in match:
        main.addPlayMs(
            mname + ' [COLOR red]' + name + ' (' + year + ')[/COLOR]', url,
            279, thumb.replace('\/', '/'), '', fan.replace('\/',
                                                           '/'), '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Songs Cached :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if dialogWait.iscanceled(): break
    main.GA("Mbox", "Music")
Beispiel #21
0
def LINK(manme, murl, thumb, fan, desc):
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile(
        '<a href="http://adf.ly/377117/(.+?)".+?target="_blank.+?>(.+?)</a>'
    ).findall(link)

    for url, name in match:
        name = name.replace('</b>', '').replace('<b>', '').replace(
            '<span style="font-size: x-large;">', ''
        ).replace(
            '<span id="goog_1857978069"></span><span id="goog_1857978070"></span>',
            ''
        ).replace(
            '<span style="font-family: Verdana, sans-serif; font-size: x-large;">',
            ''
        ).replace(
            '<span style="font-family: Verdana, sans-serif; font-size: large;">',
            '').replace('<span>', '').replace('</span>', '')
        http = re.compile('http://').findall(url)
        if len(http) == 0:
            url = 'http://' + url
        main.addPlayc(name, url, 622, thumb, desc, fan, '', '', '')
Beispiel #22
0
def EPISODES(mname, murl):
    sea = re.findall('\sSeason\s(\d+)', mname, re.DOTALL)[0]
    getepi = apibase + '/api/serials/es/?id=' + murl + '&season=' + sea
    link = main.OPENURL(getepi, ua=useragent)
    match = re.findall('"(\d+)":"([^"]+?)"', link, re.DOTALL)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Episodes list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Episodes Cached :: [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 epinum, thumb in match:
        main.addDown4(
            mname + ' Episode ' + epinum, apibase +
            '/api/serials/e?h=' + murl + '&u=' + sea + '&y=' + epinum, 279,
            thumb.replace('\/', '/'), '', '', '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Episodes Cached :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if dialogWait.iscanceled():
            return False
Beispiel #23
0
def LISTSCEPER2(name, murl):
    link = main.OPENURL(murl, timeout=10)
    link = link.replace('\xc2\xa0', '').replace('\n', '')
    match = re.compile(
        '<a href="([^<]+)">([^<]+)</a></h2>\t\t<div class=".+?<img.+?src="([^"]+?)"'
    ).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 url, name, thumb in match:
        name = main.CleanTitle(name)
        main.addPlayTE(name, url, 544, 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(
        '<a class="nextpostslink" rel="next" href="([^"]+)">').findall(link)
    if len(paginate) > 0:
        main.addDir('Next', paginate[0], 545, art + '/next2.png')
Beispiel #24
0
def LISTTV(murl):
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.compile(
        """<a href="([^<]+)" rel="bookmark" title=".+?">(.+?)</a></h2><div class="cat meta">.+?<img.+?src=([^<]+jpg|gif|jpeg|png)""",
        re.DOTALL).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 url, name, thumb in match:
        name = main.CleanTitle(name)
        thumb = thumb.replace('"', '').replace(",", '')
        main.addPlayTE(name, url, 390, 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(
        '<a class="nextpostslink" [^>]*?href="([^"]+)"').findall(link)
    if len(paginate) > 0:
        main.addDir('Next', paginate[0], 391, art + '/next2.png')
Beispiel #25
0
def LISTEXrecent(murl):
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\xc2\xa0', '')
    match = re.compile(
        """<h3 class='post-title entry-title'><a href='([^<]+)'>(.+?)</a>.+?src="(.+?)".+?""",
        re.DOTALL).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, name, thumb in match:
        main.addPlayM(name, url, 536, 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
    paginate = re.compile(
        "<a class='blog-pager-older-link' href='(.+?)' id='.+?' title='Next Movie Page'>Next Page.+?</a>"
    ).findall(link)
    if len(paginate) > 0 and len(match) == 20:
        main.addDir('Next', paginate[0], 532, art + '/next2.png')

    main.GA("Watching Now", "Recent")
Beispiel #26
0
def LISTSP3(murl):
    if murl == 'HD':
        url = 'http://www.dailyflix.net/index.php?/forum/196-hd-movies-2012-2013/page__sort_key__last_post__sort_by__Z-A'
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('&#38;', '&')
    match = re.compile(
        '<a itemprop=".+?" id=".+?" href="([^<]+)" title=.+? class=.+?><span itemprop="name">(.+?)</span>'
    ).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, name in match:
        name = main.unescapes(name)
        main.addPlayM(name, url, 54, '', '', '', '', '', '')
        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
    main.GA("HD-TV", "Dailyfix")
    main.VIEWS()
Beispiel #27
0
def CHANNELCList(murl):
    link = main.OPENURL(murl)
    match = re.compile('<li>(.+?): <a href="(.+?)">(.+?)</a> </li>').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:
        main.addPlayTE(name + ' [COLOR red]' + date + '[/COLOR]', url, 547, '',
                       '', '', '', '', '')
        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
    main.GA("TV", "CC/Tv4")
Beispiel #28
0
def SEARCH(murl):
    if murl == 's12dnm':
        keyb = xbmc.Keyboard('', 'Search Documentaries')
        keyb.doModal()
        if (keyb.isConfirmed()):
            search = keyb.getText()
            encode = urllib.quote(search)
            surl = 'http://www.documentarywire.com/?s=' + encode
    else:
        surl = murl
    link = main.OPENURL(surl)
    link = main.unescapes(link)
    match = re.compile(
        '<a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
    ).findall(link)
    for name, url, thumb, desc in match:
        main.addPlayMs(name, url, 228, thumb, desc, '', '', '', '')
    paginate = re.compile(
        """'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>"""
    ).findall(link)
    if (len(paginate) == 0):
        paginate = re.compile(
            """<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>"""
        ).findall(link)
    if (len(paginate) > 0):
        for purl in paginate:
            main.addDir('[COLOR blue]Next[/COLOR]', purl, 229,
                        art + '/next2.png')
Beispiel #29
0
def LINKINT(mname, url):
    main.GA("Einthusan", "Watched")
    ok = True
    MainUrl = "http://www.einthusan.com/movies/"
    link = main.OPENURL(url)
    try:
        match = re.compile("'hd-2': { 'file': '(.+?)'").findall(link)
        thumb = re.compile('<img src="(../images.+?)"').findall(link)
        infoLabels = main.GETMETAT(mname, '', '', thumb[0])
        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'])
        }
        desc = ' '
        for stream_url in match:
            continue

        infoL = {
            'Title': infoLabels['title'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre']
        }
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=infoLabels['title'],
            season=season,
            episode=episode,
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(mname + ' ' + '[COLOR green]Einthusan[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels='',
                        img=MainUrl + thumb[0],
                        fanart='',
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
Beispiel #30
0
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')