Exemple #1
0
def Categories(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        ' ', '').replace('\\', '').replace('\xc3\xa9', 'e').replace(
            '–', '-').replace('\xc3\xa7\xc3\xa3',
                                    'c').replace('\xc3\xad', 'i')
    match = re.findall(
        'id="menu-item-[^"]*" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-[^"]*"><a href="([^"]*)">([^>]+)</a>',
        link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait, while Category list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Categories 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 = name.replace('\r', '').replace('\n', '').replace(
            '\t', '').replace('&nbsp;', '').replace('\\', '').replace(
                '\xc3\xa9',
                'e').replace('&#8211;',
                             '-').replace('\xc3\xa7\xc3\xa3',
                                          'c').replace('\xc3\xad', 'i')
        main.addDir(name, url, 7, '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Categorias carregado :: [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
Exemple #2
0
def FAVS():
    favpath = os.path.join(main.datapath, 'Favourites')
    moviefav = os.path.join(favpath, 'Movies')
    FavFile = os.path.join(moviefav, 'Fav')
    if os.path.exists(FavFile):
        Favs = re.compile('url="(.+?)",name="(.+?)"').findall(
            open(FavFile, 'r').read())
        for url, name in Favs:
            name = name.replace('-', '').replace('&', '').replace('acute;', '')

            url = url.replace('(', '').replace('[', '')
            if url[0] == 'm':
                url = 'http://movie25.com/' + url
            link = main.OPENURL(url)
            match = re.compile(
                '<div class="movie_pic"><a href="(.+?)" target="_blank">'
            ).findall(link)
            for thumb in match:
                main.addInfo(name, url, 3, thumb, '', '')

    else:
        xbmc.executebuiltin(
            "XBMC.Notification([B][COLOR green]Mash Up[/COLOR][/B],[B]You Have No Saved Favourites[/B],5000,"
            ")")
    main.GA("None", "Movie25-Fav")
    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
    main.VIEWS()
Exemple #3
0
def Index2(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '').replace('\xc3\xa9', 'e').replace(
            '&#8211;', '-').replace('\xc3\xa7\xc3\xa3',
                                    'c').replace('\xc3\xad', 'i')
    match = re.findall(
        '<li><a class="lbp_secondary" title="([^>]+)" href="([^>]+)" target="_blank">([^"]*)</a></li>',
        link)
    for title, url, name in match:
        name = name.replace('\r', '').replace('\n', '').replace(
            '\t',
            '').replace('&nbsp;',
                        '').replace('\\',
                                    '').replace('\xc3\xa9',
                                                'e').replace('&#8211;', '-')
        #main.addPlayL(title + '   ' + name,url,150,'','','','','','')
        main.addDown2("[COLOR blue]" + name + "[/COLOR]", url, 150, '', '')

    match2 = re.findall(
        'href="https://docs.google.com/file/([^"]*)" target="_blank">([^"]*)</a>',
        link)
    for url, name in match2:
        name = name.replace('\r', '').replace('\n', '').replace(
            '\t',
            '').replace('&nbsp;',
                        '').replace('\\',
                                    '').replace('\xc3\xa9',
                                                'e').replace('&#8211;', '-')
        url = 'https://docs.google.com/file/' + url
        main.addDown2("[COLOR blue]" + name.strip() + "[/COLOR]", url, 150, '',
                      '')
Exemple #4
0
def VIDEOLINKS(name, url):
    video_source_id = 1
    video_source_name = None
    video_playlist_items = []

    link = main.OPENURL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    soup = BeautifulSoup.BeautifulSoup(link).findAll(
        'blockquote', {'class': re.compile(r'\bpostcontent\b')})[0]

    for e in soup.findAll('br'):
        e.extract()
    if soup.has_key('div'):
        soup = soup.findChild('div', recursive=False)

    for child in soup.findChildren():
        if (child.name == 'font') and re.search(
                'Links|Online', str(child.getText()), re.IGNORECASE):
            if len(video_playlist_items) > 0:
                main.addPlayList(video_source_name, url, 40, video_source_id,
                                 video_playlist_items, name,
                                 getVideoSourceIcon(video_source_name))
                video_playlist_items = []
                video_source_id = video_source_id + 1
            video_source_name = child.getText()
            video_source_name = video_source_name.replace(
                'Online',
                '').replace('Links', '').replace('Quality', '').replace(
                    'Watch', '').replace('-', '').replace('  ', '')
        elif (child.name == 'a') and not child.getText() == 'registration':
            video_playlist_items.append(str(child['href']))
Exemple #5
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')
Exemple #6
0
def SEARCH(url=''):
    encode = main.updateSearchFile(url, 'TV')
    if not encode: return False
    surl = 'http://videobull.to/?s=' + encode + '&x=0&y=0'
    link = main.OPENURL(surl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile(
        'class="cover"><a href="([^"]*)" rel="bookmark" title="([^"]*)"><img src="([^"]*)"'
    ).findall(link)
    if len(match) > 0:
        for url, name, thumb in match:
            main.addDir(name, url, 864, thumb)
    else:
        match = re.compile(
            'class="contentarchivetime">([^"]*)</div><div class="contentarchivetitle"><a href="([^"]*)" title=".+?">([^"]*)</a></div>'
        ).findall(link)
        for date, url, name in match:
            main.addDir(name, url, 864, '')
        paginate = re.compile(
            '="nextpostslink" rel="next" href="([^"]*)">&raquo;</a>').findall(
                link)
        if paginate:
            xurl = paginate[0]
            main.addDir('[COLOR blue]Next Page' + '[/COLOR]', xurl, 867,
                        art + '/next2.png')
Exemple #7
0
def Epornik2(url, name):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.compile('file: "([^"]*)",').findall(link)
    for url in match:
        xbmc.Player().play(url)
Exemple #8
0
def GotoPageB(url, index=False):
    link = main.OPENURL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    r = re.findall(
        '>Next</a><a href=\'search.php.?page=(.+?)&year=.+?\'>Last</a>', link)
    dialog = xbmcgui.Dialog()
    d = dialog.numeric(0, 'Section Last Page = ' + r[0])
    if d:
        pagelimit = int(r[0])
        if int(d) <= pagelimit:
            encode = urllib.quote(d)
            year = url.split('year=')
            url = url.split('year=')
            url = url[0].split('page=')
            surl = url[0] + 'page=' + encode + '&year=' + year[1]
            NEXTPAGE(surl, index=index)
        else:
            dialog = xbmcgui.Dialog()
            ret = dialog.ok('Wrong Entry',
                            'The page number you entered does not exist.',
                            ' This sections page limit is ' + str(pagelimit))
    else:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        return False
Exemple #9
0
def VIDEOLINKS(name, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    qual = re.compile('<h1 >Links - Quality\s*?([^\s]+?)\s*?</h1>').findall(
        link)
    quality = str(qual)
    quality = quality.replace("'", "")
    name = name.split('[COLOR blue]')[0]
    import collections
    all = re.compile(
        '<li class="link_name">\s*?([^<^\s]+?)\s*?</li>.+?<li class=".+?"><span><a href="([^"]+?)"'
    ).findall(link)
    all_coll = collections.defaultdict(list)
    for d in all:
        all_coll[d[0]].append(d[1])
    all_coll = all_coll.items()
    sortorder = "putlocker,sockshare,billionuploads,hugefiles,mightyupload,movreel,lemuploads,180upload,megarelease,filenuke,flashx,gorillavid,bayfiles,veehd,vidto,epicshare,2gbhosting,alldebrid,allmyvideos,castamp,cheesestream,clicktoview,crunchyroll,cyberlocker,daclips,dailymotion,divxstage,donevideo,ecostream,entroupload,facebook,filebox,hostingbulk,hostingcup,jumbofiles,limevideo,movdivx,movpod,movshare,movzap,muchshare,nolimitvideo,nosvideo,novamov,nowvideo,ovfile,play44_net,played,playwire,premiumize_me,primeshare,promptfile,purevid,rapidvideo,realdebrid,rpnet,seeon,sharefiles,sharerepo,sharesix,skyload,stagevu,stream2k,streamcloud,thefile,tubeplus,tunepk,ufliq,upbulk,uploadc,uploadcrazynet,veoh,vidbull,vidcrazynet,video44,videobb,videofun,videotanker,videoweed,videozed,videozer,vidhog,vidpe,vidplay,vidstream,vidup_org,vidx,vidxden,vidzur,vimeo,vureel,watchfreeinhd,xvidstage,yourupload,youtube,youwatch,zalaa,zooupload,zshare,"
    sortorder = ','.join((sortorder.split(',')[::-1]))
    all_coll = sorted(all_coll,
                      key=lambda word: sortorder.find(word[0].lower()) * -1)
    for host, urls in all_coll:
        if host.lower() in sortorder:
            host = host.strip()
            main.addDirb(
                name + " [COLOR red]" + quality +
                "[/COLOR]" + " [COLOR blue]" + host.upper() + "[/COLOR]",
                str(urls), 11, art + '/hosts/' + host + '.png',
                art + '/hosts/' + host + '.png')
Exemple #10
0
def Popular(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '').replace('\xe2\x80\xa6', '...')
    match = re.findall('<option value="([^>]+)">([^"]*)</option>', link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Popular List is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Popular List 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 = name.replace('\r', '').replace('\n', '').replace(
            '\t', '').replace('&nbsp;', '').replace('\\', '').replace(
                '\xe2\x80\x99',
                "'").replace('\xe2\x80\x93',
                             '-').replace('\xe2\x80\x94',
                                          '').replace('&-', '-')
        main.addDir(name, url, 7, '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Popular List 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
Exemple #11
0
def Archive(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '').replace('\xe2\x80\x99', "'").replace(
            '\xe2\x80\x93', '-').replace('\xe2\x80\x94',
                                         '').replace('&-', '-')
    match = re.findall(
        '<li><a href=\'([^>]+)\' title=\'[^>]+\'>([^>]+)</a></li>', link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Archives is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Archives 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 = name.replace('\r', '').replace('\n', '').replace(
            '\t', '').replace('&nbsp;', '').replace('\\', '').replace(
                '\xe2\x80\x99',
                "'").replace('\xe2\x80\x93',
                             '-').replace('\xe2\x80\x94',
                                          '').replace('&-', '-')
        main.addDir(name, url, 1, '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Archives 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
Exemple #12
0
def TVTags(url,name): ################# TV A-Z List #################
        link=main.OPENURL(url)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
        match = re.findall('<li><a href="/tv/tvtag/([^"]*)">([^"]*)</a></li>',link)
        for url,name in match:
                url = 'http://www.thedarewall.com/tv/tvtag/' + url
                main.addDir(name,url,3,'')
Exemple #13
0
def GRABLINKS(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('<img src=images/star.gif>',
                              '').replace('player=2', '')
    matchname = re.compile(
        '<div align="left"><strong>Watch ([^"]*) on:</strong></div>').findall(
            link)
    for name in matchname:
        match = re.compile(
            '<a id="link-[^"]*" href="info.php[?]id=([^"]*)&([^"]*)&link=([^"]*)&host=[^"]*"><div class="[^"]*"><span class="([^"]*)"></span></div><div class="[^"]*">([^"]*)</div>'
        ).findall(link)
        for link, age, link1, quality, host in match:
            if 'older' in age:
                url = base_url + 'player.php?authid=&id=' + link + '&link=' + link1 + '&type=older_v2&part=&site=inactive&ref=1'
                main.addDown2(
                    name.strip() + " [COLOR blue]" + host.upper() + "[/COLOR]",
                    url, 6, '.png', '.png')
    else:
        match = re.compile(
            'href="info.php[?]id=([^"]*)&link=([^"]*)&host=[^"]*"><div class="[^"]*"><span class="([^"]*)"></span></div><div class="[^"]*">([^"]*)</div>'
        ).findall(link)
        for link, link1, quality, host in match:
            url = base_url + 'player.php?authid=&id=' + link + '&link=' + link1 + '&type=new&part=&site=inactive&ref=1'
            main.addDown2(
                name.strip() + " [COLOR blue]" + host.upper() + "[/COLOR]",
                url, 6, '.png', '.png')
Exemple #14
0
def Epornik1(url):
    link = main.OPENURL(url)
    main.addLink("[COLOR red]-  Epornik -[/COLOR]", '', '')
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    firstmatch = re.compile('src="([^"]*)"></iframe>').findall(link)
    for url in firstmatch:
        main.addDown2("[COLOR blue]PLAY[/COLOR]", url, 74, '.png', '.png')
Exemple #15
0
def Play(name, url):
    ok = True
    hname = name
    name = name.split('[COLOR blue]')[0]
    name = name.split('[COLOR red]')[0]
    infoLabels = main.GETMETAT(name, '', '', '')
    link = main.OPENURL(url)
    match = re.compile("Javascript:location.?href=.+?\\'(.+?)'").findall(link)
    for url in match:
        print url
    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'])
    }

    try:
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = urlresolver.resolve(url)

        infoL = {
            'Title': infoLabels['metaName'],
            '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=str(infoLabels['title']),
            season=str(season),
            episode=str(episode),
            year=str(infoLabels['year']),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id)
        #WatchHistory
        #if selfAddon.getSetting("whistory") == "true":
        #wh.add_item(hname+' '+'[COLOR green]FreeOMovie[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
        #player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
Exemple #16
0
def Play(url, name):
    sources = []
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,2000)")
    match = re.compile('<a href="([^"]*)" target="_blank">Open video').findall(
        link)
    for url in match:
        url = url
        print url
        hosted_media = urlresolver.HostedMediaFile(url=url)
        sources.append(hosted_media)
    match = re.compile(
        'Mobile Friendly</span></a>.+?<a href="([^"]*)" target="_blank">Open video</a>'
    ).findall(link)
    for url in match:
        url = url
        print url
        hosted_media = urlresolver.HostedMediaFile(url=url)
        sources.append(hosted_media)
    match = re.compile('action="([^"]*)" style').findall(link)
    for url in match:
        url = url
        print url
        hosted_media = urlresolver.HostedMediaFile(url=url)
        sources.append(hosted_media)
    match = re.compile('location.href = \'([^"]*)\';').findall(link)
    for url in match:
        url = url
        print url
        hosted_media = urlresolver.HostedMediaFile(url=url)
        sources.append(hosted_media)
    match = re.compile('location.href = "([^"]*)";').findall(link)
    for url in match:
        url = url
        print url
        hosted_media = urlresolver.HostedMediaFile(url=url)
        sources.append(hosted_media)
    if (len(sources) == 0):
        xbmc.executebuiltin(
            "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")

    else:
        source = urlresolver.choose_source(sources)
        if source:
            stream_url = source.resolve()
            if source.resolve() == False:
                xbmc.executebuiltin(
                    "XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)")
                return
        else:
            stream_url = False
            return
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png")
        listitem.setInfo('video', {'Title': name, 'Year': ''})
        xbmc.Player().play(str(stream_url), listitem)
        main.addDir('', '', '', '')
Exemple #17
0
def LISTMOVIES(murl):
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall(
        'movie_pic"><a href="([^"]+)"  target=".+?<img src="(.+?)".+?target="_self">([^<]+)</a>.+?>([^<]+)</a>.+?<br/>Views: <span>(.+?)</span>.+?(.+?)votes.*?<li class="current-rating" style="width:(\d+?)px',
        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, genre, views, votes, rating in match:
        votes = votes.replace('(', '')
        name = name.replace('-', '').replace('&', '').replace('acute;',
                                                              '').strip()
        main.addInfo(
            name + '[COLOR blue] Views: ' + views +
            '[/COLOR] [COLOR red]Votes: ' + votes +
            '[/COLOR] [COLOR green]Rating: ' + rating + '/100[/COLOR]',
            MainUrl + url, 3, thumb, genre, '')
        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("None", "Movie25-list")

    paginate = re.compile('</a><a href=\'([^<]+)\'>Next</a>').findall(link)
    if paginate:
        #                 main.addDir('[COLOR red]Home[/COLOR]','',2000,art+'/home.png')
        main.addDir('[COLOR red]Enter Page #[/COLOR]', murl, 207,
                    art + '/gotopage.png')
        xurl = MainUrl + paginate[0]
        r = re.findall('>Next</a><a href=\'/.+?/(\d+)\'>Last</a>', link)
        pg = re.findall('/.+?/(\d+)', paginate[0])
        pg = int(pg[0]) - 1
        if r:
            main.addDir(
                '[COLOR blue]Page ' + str(pg) + ' of ' + r[0] + '[/COLOR]',
                xurl, 1, art + '/next2.png')
        else:
            main.addDir('[COLOR blue]Page ' + str(pg) + '[/COLOR]', xurl, 1,
                        art + '/next2.png')

    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
    main.VIEWS()
Exemple #18
0
def VIDEOLINKS(name, url):
    link = main.OPENURL(url)
    #print link
    #link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('\\','')
    qual = re.compile('<h1>Links - Quality\s*?([^\s]+?)\s*?</h1>').findall(
        link)
    quality = str(qual)
    quality = quality.replace("'", "")
    name = name.split('[COLOR blue]')[0]

    links = common.parseDOM(link, "div", attrs={"class": "links"})
    if len(links) > 0:
        links = links[0]
    else:
        links = common.parseDOM(link, "div", attrs={"id": "links"})[0]

    tmplinks = common.parseDOM(links, "ul")
    tmplinks += common.parseDOM(links, "ul", attrs={"class": "hidden"})
    links = tmplinks
    import collections
    all_coll = collections.defaultdict(list)

    for item in links:
        host = common.parseDOM(item, "li", attrs={"class": "link_name"})

        if len(host) > 0:
            host = host[0]
        else:
            host = common.parseDOM(item, "li", attrs={"id": "link_name"})[0]
        url = common.parseDOM(item, "a", ret="href")
        if len(url) > 0:
            url = url[0]
        else:
            #url = re.findall(',\'(.+?)\'.;',item)[0] # Gets the direct URL
            url = common.parseDOM(item,
                                  "li",
                                  attrs={"id": "download"},
                                  ret="onclick")[0]
            url = re.findall('open\(\'(.+?)\'\)', url)[0]
        all_coll[host].append(url)

    all_coll = all_coll.items()
    fixed = "180upload, movreel"
    broken = "hugefiles"
    notsupported = "realvid, thevideo,  cloudyvideos,beststreams, vidzi"
    sortorder = "putlocker,sockshare,hugefiles,mightyupload,movreel,lemuploads,180upload,megarelease,filenuke,flashx,gorillavid,bayfiles,veehd,vidto,epicshare,2gbhosting,alldebrid,allmyvideos,castamp,cheesestream,clicktoview,crunchyroll,cyberlocker,daclips,dailymotion,divxstage,donevideo,ecostream,entroupload,facebook,filebox,hostingbulk,hostingcup,jumbofiles,limevideo,movdivx,movpod,movshare,movzap,muchshare,nolimitvideo,nosvideo,novamov,nowvideo,ovfile,play44_net,played,playwire,premiumize_me,primeshare,promptfile,purevid,rapidvideo,realdebrid,rpnet,seeon,sharefiles,sharerepo,sharesix,skyload,stagevu,stream2k,streamcloud,thefile,tubeplus,tunepk,ufliq,upbulk,uploadc,uploadcrazynet,veoh,vidbull,vidcrazynet,video44,videobb,videofun,videotanker,videoweed,videozed,videozer,vidhog,vidpe,vidplay,vidstream,vidup_org,vidx,vidxden,vidzur,vimeo,vureel,watchfreeinhd,xvidstage,yourupload,youtube,youwatch,zalaa,zooupload,zshare,vodlocker, streamin, letwatch,  "
    sortorder = ','.join((sortorder.split(',')[::-1]))
    all_coll = sorted(all_coll,
                      key=lambda word: sortorder.find(word[0].lower()) * -1)
    for host, urls in all_coll:
        if host.lower() in sortorder:
            host = host.strip()
            main.addDirb(
                name + " [COLOR red]" + quality +
                "[/COLOR]" + " [COLOR blue]" + host.upper() + "[/COLOR]",
                str(urls), constants.MOVIE25_GROUPED_HOSTS,
                art + '/hosts/' + host + '.png',
                art + '/hosts/' + host + '.png')
def EPISODES(url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('&#8211; ', ' - ')
    match = re.compile(
        '<a href="([^"]*)" rel=nofollow" target="_blank">([^"]*)</a>').findall(
            link)
    for url, name in match:
        addDir(name, str(url), 7, '', '')
Exemple #20
0
def VIDEOLINKS(name, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.compile(
        '''<a id='.+?' href='.*?title=(.+?)' target='_blank' rel='nofollow'>(.+?)</a>''',
        re.DOTALL).findall(link)
    for url, host in match:
        main.addDownLink('[COLOR green][B]' + host + '[/B][/COLOR]', url, 100,
                         '', '')
Exemple #21
0
def YOUList(mname, durl):
    murl = 'http://gdata.youtube.com/feeds/api/users/' + durl + '/uploads?start-index=1&max-results=50'
    link = main.OPENURL(murl)
    match = re.compile(
        "http\://www.youtube.com/watch\?v\=([^\&]+)\&.+?<media\:descriptio[^>]+>([^<]+)</media\:description>.+?<media\:thumbnail url='([^']+)'.+?<media:title type='plain'>(.+?)/media:title>"
    ).findall(link)
    for url, desc, thumb, name in match:
        name = name.replace('<', '')
        main.addPlayMs(name, url, 48, thumb, desc, '', '', '', '')
    main.GA(mname, "Youtube-List")
Exemple #22
0
def YEARS(url, index=False):
    link = main.OPENURL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall('<li><a href="[?]year=([^"]*)">([^"]*)</a>', link)
    for url, name in match:
        url = MainUrl + '?year=' + url
        main.addDir(name, url, 1, '', '')
Exemple #23
0
def MoviesTags(url,
               name):  ################# Movie Genre List #################
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.findall(
        '<li><a href="(http://www.thedarehub.com/tv/movie-tags/.+?)">([^"]*?)</a></li>',
        link)
    for url, name in match:
        main.addDir(name, url, 13, '')
Exemple #24
0
def TVGENRES(url, index=False):
    link = main.OPENURL(url)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall('<a href="[?]genre=([^"]*)">([^"]*)</a></li>', link)
    for url, name in match:
        url = MainUrl + '?genre=' + url
        main.addDir(name, url, 11, '', '')
Exemple #25
0
def GRABMORE(name, url):
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.compile(
        '<strong>Watch ([^"]*) on ([^"]*) </strong></span><div class="clear"></div></div><div class="player"><a href="([^"]*)" target'
    ).findall(link)
    for name, host, url in match:
        url = base_url + url
        main.addDown2(name + ' ' + host, url, 6, '', '')
Exemple #26
0
def SEARCH(murl=''):
    encode = main.updateSearchFile(murl, 'Movies')
    if not encode: return False
    surl = MainUrl + '/search.php?key=' + encode + '&submit='
    link = main.OPENURL(surl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.compile(
        '<div class="movie_pic"><a href="([^"]+?)"[^>]+?>\s*?<img src="([^"]+?)"[^>]+?>.+?<a href[^>]+?>([^<]+?)</a></h1><div class=".+?">().*?Views: <span>(.+?)</span>.+?id=RateCount_.+?>(.+?)</span>.*?<li class="current-rating" style="width:(\d+?)px'
    ).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, genre, views, votes, rating in match:
        name = name.replace('-', '').replace('&', '').replace('acute;', '')
        furl = MainUrl + url
        main.addInfo(
            name + '[COLOR blue] Views: ' + views +
            '[/COLOR] [COLOR red]Votes: ' + votes +
            '[/COLOR] [COLOR green]Rating: ' + rating + '/100[/COLOR]', furl,
            3, thumb, genre, '')
        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='search.php.?page=.+?'>Next</a>", link)
    if exist:
        r = re.findall(
            """>Next</a><a href='search.php.?page=([^<]+)&key=.+?'>Last</a>""",
            link)
        if r:
            main.addDir(
                '[COLOR blue]Page 1 of ' + r[0] + '[/COLOR]',
                'http://www.movie25.so/search.php?page=2&key=' + encode, 9,
                art + '/next2.png')
        else:
            main.addDir(
                '[COLOR blue]Page 1[/COLOR]',
                'http://www.movie25.so/search.php?page=2&key=' + encode, 9,
                art + '/next2.png')
    xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
    main.GA("None", "Movie25-Search")
Exemple #27
0
def MOVRLINKS(name, url):
    link = main.OPENURL(url)
    main.addLink(
        "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
        '', '')
    movreel = re.compile(
        '<li class=link_name>movreel</li><li class=".+?"><span><a href=(.+?) target=".+?">'
    ).findall(link)
    for url in movreel:
        main.addDown(name, url, 5, art + '/hosts/movreel.png',
                     art + '/hosts/movreel.png')
Exemple #28
0
def LISTSHOWS(murl, channel, index=False):
    link = main.OPENURL(murl)
    link = link.replace('\r',
                        '').replace('\n',
                                    '').replace('\t',
                                                '').replace('&nbsp;', '')
    match = re.findall(
        '<div class="titleline"><h2 class="forumtitle"><a href="(.+?)">(.+?)</a></h2></div>',
        link)
    label = 'TV Shows'
    if not len(match) > 0:
        match = re.findall(
            '<h3 class="threadtitle">.+?<a class=".+?" href="(.+?)" id=".+?">(.+?)</a></h3>',
            link)
        label = 'Movies'
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until ' + label +
                            ' Show list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = label + ' 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, name in match:
        if "color" in name:
            name = name.replace('<b><font color=red>',
                                '[COLOR red]').replace('</font></b>',
                                                       '[/COLOR]')
            name = name.replace('<b><font color="red">',
                                '[COLOR red]').replace('</font></b>',
                                                       '[/COLOR]')
        if label == 'Movies':
            main.addDirX(name,
                         MainUrl + url,
                         39,
                         '',
                         searchMeta=True,
                         metaType='Movies')
        else:
            main.addTVInfo(name, MainUrl + url, 38,
                           getShowImage(channel, name), '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = label + ' 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]), label)
    main.VIEWS()
Exemple #29
0
def BUPLOADSLINKS(name, url):
    link = main.OPENURL(url)
    main.addLink(
        "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",
        '', '')
    billionuploads = re.compile(
        '<li class=link_name>billionuploads</li><li class=".+?"><span><a href=(.+?) target=".+?">'
    ).findall(link)
    for url in billionuploads:
        main.addDown(name, url, 5, art + '/hosts/billionuploads.png',
                     art + '/hosts/billionuploads.png')
Exemple #30
0
def MoviesTags(url,
               name):  ################# Movie Genre List #################
    link = main.OPENURL(url)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        '&nbsp;', '').replace('\\', '')
    match = re.findall(
        '<a href="http://www.thedarewall.com/tv/movie-tags/([^"]*)">([^"]*)</a>',
        link)
    for url, name in match:
        url = 'http://www.thedarewall.com/tv/movie-tags/' + url
        main.addDir(name, url, 13, '')