Example #1
0
def superSearch(encode,type):
    if encode:
        returnList=[]
        epi = re.search('(?i)s(\d+?)e(\d+?)$',encode)
        if epi:
            epistring = encode.rpartition('%20')[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            site = 'site:http://tubeplus.me'
            results = main.SearchGoogle(urllib.unquote(encode), site)
            for res in results:
                t = res.title.encode('utf8')
                u = res.url.encode('utf8')
                if type == 'TV':
                    t = re.sub('(.*\)).*','\\1',t)
                    returnList.append((t.strip(" -").replace("-","").split(" Watch Online")[0],prettyName,u.replace('http://www.tubeplus.me/',''),'',1026,True))
                    return returnList
        if type=='Movies':
            surl = BASE_URL+'search/movies/'+encode+'/0/'
        else:
            surl = BASE_URL+'search/tv-shows/'+encode+'/0/'
        
        link=main.OPENURL(surl,verbose=False)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
        r = re.compile(r'<div id="list_body">(.+?)<div id="list_footer"></div>', re.DOTALL|re.I|re.M).findall(link)
        match = re.compile(r'title="Watch online: ([^"]*)" href="/([^"]*)"><img border="0" alt=".+?" src="([^"]*)"></a>', re.I).findall(str(r))
        for name, url, thumb in match:
            thumb=BASE_URL+thumb
            if type=='Movies':
                returnList.append((name,prettyName,url,thumb,1026,True))
            else:
                returnList.append((name,prettyName,url,thumb,1049,True))
        return returnList
Example #2
0
def SearchIceFilms(searchQuery='', type='Movies', index=False):
    searchQuery = main.updateSearchFile(searchQuery, type)
    if not searchQuery: return False
    if type == 'Movies':
        site = 'site:http://icefilms.info/ip'
    else:
        site = 'site:http://icefilms.info/tv/series'
    results = main.SearchGoogle(urllib.unquote(searchQuery), site)
    r = 0
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    totalLinks = len(results)
    remaining_display = 'Movies loaded :: [B]' + str(r) + ' / ' + str(
        totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    if results:
        for res in results:
            t = res.title.encode('utf8')
            u = res.url.encode('utf8')
            if type == 'TV':
                t = t.rpartition('Episode List')[0]
                main.addDirT(t.strip(" -"),
                             u,
                             289,
                             '',
                             '',
                             '',
                             '',
                             '',
                             '',
                             index=index)
                r += 1
            else:
                if not re.search('(?i)\s\d+x\d+', t) and (re.search(
                        '(?i)links', t) or re.search('\.\.\.$', t)):
                    t = re.sub('(.*\)).*', '\\1', t)
                    if index == 'True':
                        main.addDirM(t.strip(), u, 21, '', '', '', '', '', '')
                    else:
                        main.addDirM(t.strip(), u, 283, '', '', '', '', '', '')
                    r += 1
                else:
                    if totalLinks > 1: totalLinks -= 1
            percent = (r * 100) / totalLinks
            remaining_display = 'Movies loaded :: [B]' + str(r) + ' / ' + str(
                totalLinks) + '[/B].'
            dialogWait.update(percent,
                              '[B]Will load instantly from now on[/B]',
                              remaining_display)
            if dialogWait.iscanceled(): return False
    if not r:
        xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
        xbmc.executebuiltin("XBMC.Notification(Sorry,No results found,3000)")
        return False
    main.GA("IceFilms", "Search")
Example #3
0
def superSearch(encode, type):
    try:
        returnList = []
        epi = re.search('(?i)s(\d+?)e(\d+?)$', encode)
        if epi:
            epistring = encode.rpartition('%20')[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            if len(str(e)) == 1:
                e = '0' + str(e)
            encodewithoutepi = urllib.quote(
                re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)',
                       '', urllib.unquote(encode)).strip())
            encode = encodewithoutepi + ' ' + str(s) + 'x' + str(e)
        if type == 'Movies' or epi:
            site = 'site:http://icefilms.info/ip'
        else:
            site = 'site:http://icefilms.info/tv/series'
        results = main.SearchGoogle(urllib.unquote(encode), site)
        for res in results:
            t = res.title.encode('utf8')
            u = res.url.encode('utf8')
            if type == 'TV':
                if epi:
                    t = re.sub('(.*\)).*', '\\1', t)
                    returnList.append(
                        (t.strip(" -"), prettyName, u, '', 283, True))
                else:
                    t = t.rpartition('Episode List')[0]
                    returnList.append(
                        (t.strip(" -"), prettyName, u, '', 289, True))
            else:
                if not re.search('(?i)\s\d+x\d+', t) and (re.search(
                        '(?i)links', t) or re.search('\.\.\.$', t)):
                    t = re.sub('(.*\)).*', '\\1', t)
                    returnList.append(
                        (t.strip(" -"), prettyName, u, '', 283, True))
        return returnList
    except:
        return []
Example #4
0
def superSearch(encode, type):
    try:
        returnList = []
        if type == 'Movies':
            site = 'site:http://icefilms.info/ip'
        else:
            site = 'site:http://icefilms.info/tv/series'
        results = main.SearchGoogle(urllib.unquote(encode), site)
        for res in results:
            t = res.title.encode('utf8')
            u = res.url.encode('utf8')
            if type == 'TV':
                t = t.rpartition('Episode List')[0]
                returnList.append(
                    (t.strip(" -"), prettyName, u, '', 289, True))
            else:
                if not re.search('(?i)\s\d+x\d+', t) and (re.search(
                        '(?i)links', t) or re.search('\.\.\.$', t)):
                    t = re.sub('(.*\)).*', '\\1', t)
                    returnList.append(
                        (t.strip(" -"), prettyName, u, '', 283, True))
        return returnList
    except:
        return []
Example #5
0
def superSearch(encode, type):
    try:
        returnList = []
        surl = 'http://watchseries.ag/search/' + encode
        epi = re.search('(?i)s(\d+?)e(\d+?)$', encode)
        if epi:
            epistring = encode.rpartition('%20')[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            encodewithoutepi = urllib.quote(
                re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)',
                       '', urllib.unquote(encode)).strip())
            encode = encodewithoutepi + ' season ' + str(
                s) + ' episode ' + str(e)
            site = 'site:http://watchseries.ag/'
            results = main.SearchGoogle(urllib.unquote(encode), site)
            for res in results:
                t = res.title.encode('utf8').strip('...')
                u = res.url.encode('utf8')
                if type == 'TV':
                    if re.search(
                            '(?sim)season ' + str(s) + ' episode ' + str(e),
                            t):
                        t = re.sub('(?i)^[a-z] - (.*?)', '\\1', t)
                        t = re.sub('(.*\)).*', '\\1', t)
                        t = t.strip(" -").replace("-", "").replace(
                            " WatchSeries.lt",
                            "").replace(" Watch Series", "").replace(
                                "Watch Online ",
                                "").replace("Watch Online",
                                            "").replace("  ", " ")
                        name = re.sub('\((\d+)x(\d+)\)', '', t, re.I)
                        episode = re.search(
                            'Seas(on)?\.? (\d+).*?Ep(isode)?\.? (\d+)', name,
                            re.I)
                        if (episode):
                            e = str(episode.group(4))
                            if (len(e) == 1): e = "0" + e
                            s = episode.group(2)
                            if (len(s) == 1): s = "0" + s
                            name = re.sub(
                                'Seas(on)?\.? (\d+).*?Ep(isode)?\.? (\d+)',
                                "S" + s + "E" + e, name, re.I).strip()
                            name = re.sub('(?i)(s\d+e\d+\s?)(.*?)$',
                                          '\\1[COLOR blue]\\2[/COLOR]', name)
                        returnList.append((name, prettyName, u, '', 575, True))
                        return returnList
        link = main.OPENURL(surl, verbose=False)
        link = link.replace('\r',
                            '').replace('\n',
                                        '').replace('\t',
                                                    '').replace('&nbsp;', '')
        match = re.compile(
            '<img src="([^"]+?)">               </a>.*?<a title="[^"]+?" href="([^<]+)"><b>(.+?)</b>',
            re.DOTALL).findall(link)
        for thumb, url, name in match:
            url = 'http://watchseries.ag' + url
            returnList.append((name, prettyName, url, thumb, 578, True))
        return returnList
    except:
        return []