예제 #1
0
def bitsnoop0(params):
    plugintools.log("[movie.ultra.7k 0.3.0].BitSnoop" + repr(params))

    try:
        texto = ""
        texto = 'riddick'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Movie Ultra 7K", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")

            # http://bitsnoop.com/search/all/the+strain+spanish/c/d/1/
            url = 'http://bitsnoop.com/search/all/' + texto + '/c/d/1/'
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1(params)
    except:
        pass
예제 #2
0
def bitsnoop0_bum(params):
    plugintools.log('[%s %s] [BUM+] BitSnoop... %s' %
                    (addonName, addonVersion, repr(params)))

    try:
        texto = ""
        texto = 'riddick'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")

            # http://bitsnoop.com/search/all/the+strain+spanish/c/d/1/
            url = 'http://bitsnoop.com/search/all/' + texto + '/c/d/1/'
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1_bum(params)
    except:
        pass
예제 #3
0
def bitsnoop0_bum(params):
    plugintools.log('[%s %s] [BUM+] BitSnoop... %s' % (addonName, addonVersion, repr(params)))

    try:
        texto = "";
        texto='riddick'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search",texto)
        params["plot"]=texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message("PalcoTV","Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            
            # http://bitsnoop.com/search/all/the+strain+spanish/c/d/1/
            url = 'http://bitsnoop.com/search/all/'+texto+'/c/d/1/'
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1_bum(params)
    except:
         pass    
예제 #4
0
def monova0_bum(params):
    plugintools.log('[%s %s] [BUM+] Monova... %s' %
                    (addonName, addonVersion, repr(params)))

    thumbnail = 'http://upload.wikimedia.org/wikipedia/en/f/f4/Monova.jpg'
    fanart = 'http://www.gadgethelpline.com/wp-content/uploads/2013/10/Digital-Piracy.png'
    show = 'list'
    plugintools.modo_vista(show)

    try:
        texto = ""
        texto = 'the strain spanish'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca el término a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")

            # https://isohunt.to/torrents/?ihq=the+strain+spanish
            url = 'https://www.monova.org/search.php?sort=5&term=' + texto + '&verified=1'
            params["url"] = url
            url = params.get("url")
            referer = 'https://monova.org'
            monova1_bum(params)
    except:
        pass
예제 #5
0
def monova0_bum(params):
    plugintools.log('[%s %s] [BUM+] Monova... %s' % (addonName, addonVersion, repr(params)))

    thumbnail = 'http://upload.wikimedia.org/wikipedia/en/f/f4/Monova.jpg'
    fanart = 'http://www.gadgethelpline.com/wp-content/uploads/2013/10/Digital-Piracy.png'    
    show = 'list'
    plugintools.modo_vista(show)
    
    try:
        texto = "";
        texto='the strain spanish'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search",texto)
        params["plot"]=texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message("PalcoTV","Por favor, introduzca el término a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            
            # https://isohunt.to/torrents/?ihq=the+strain+spanish
            url = 'https://www.monova.org/search.php?sort=5&term='+texto+'&verified=1'
            params["url"]=url            
            url = params.get("url")
            referer = 'https://monova.org'
            monova1_bum(params)
    except:
         pass
예제 #6
0
def mundoplus0(params):
    plugintools.log("[Arena+ 0.3.3].Mundoplus.tv " + repr(params))
    try:
        texto = ""
        texto = 'strain'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("mundoplus_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca serie a buscar")
            return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            url = 'http://www.mundoplus.tv/programacion/buscador.php?canal=g_todos&fecha=TODAS&buscar=' + texto
            #url = 'http://www.alluc.com/stream/'+texto+'++lang:es'
            #url=baseurl+'stream/?q='+texto+'&stream=Streams'
            #url=baseurl+'stream/'+texto
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.mundoplus.tv'
            plugintools.log("Texto a buscar: " + title)
            mundoplus1(params)

    except:
        pass
예제 #7
0
def isohunt0_bum(params):
    plugintools.log('[%s %s] [BUM+] Isohunt... %s' % (addonName, addonVersion, repr(params)))

    thumbnail = 'http://www.userlogos.org/files/logos/dfordesmond/isohunt%201.png'
    fanart = 'http://2.bp.blogspot.com/_NP40rzexJsc/TMGWrixybJI/AAAAAAAAHCU/ij1--_DQEZo/s1600/Keep_Seeding____by_Carudo.jpg'    
    show = 'list'
    plugintools.modo_vista(show)
    
    try:
        texto = "";
        texto='riddick'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search",texto)
        params["plot"]=texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message("PalcoTV","Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            
            # https://isohunt.to/torrents/?ihq=the+strain+spanish
            url = 'https://isohunt.to/torrents/?ihq='+texto+'&Torrent_sort=seeders.desc'
            params["url"]=url            
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1_bum(params)
    except:
         pass       
예제 #8
0
def isohunt0_bum(params):
    plugintools.log('[%s %s] [BUM+] Isohunt... %s' %
                    (addonName, addonVersion, repr(params)))

    thumbnail = 'http://www.userlogos.org/files/logos/dfordesmond/isohunt%201.png'
    fanart = 'http://2.bp.blogspot.com/_NP40rzexJsc/TMGWrixybJI/AAAAAAAAHCU/ij1--_DQEZo/s1600/Keep_Seeding____by_Carudo.jpg'
    show = 'list'
    plugintools.modo_vista(show)

    try:
        texto = ""
        texto = 'riddick'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("alluc_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")

            # https://isohunt.to/torrents/?ihq=the+strain+spanish
            url = 'https://isohunt.to/torrents/?ihq=' + texto + '&Torrent_sort=seeders.desc'
            params["url"] = url
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1_bum(params)
    except:
        pass
예제 #9
0
    def onAction(self, action):

        if action.getId() == xbmcgui.ACTION_PREVIOUS_MENU or action.getId(
        ) == xbmcgui.ACTION_NAV_BACK:
            # xbmc.executebuiltin("RunPlugin(plugin://plugin.video.VADER/menu)")
            plugintools.set_setting('mcClosedTime', str(int(time.time())))

            self.close()
예제 #10
0
def read_body_and_headers(url,
                          post=None,
                          headers=[],
                          follow_redirects=True,
                          timeout=None):
    plugintools.log("movie4k.read_body_and_headers url=" + url)

    # Spoof user agent ID
    headers.append([
        "User-Agent",
        "Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0"
    ])

    expiration = datetime.datetime.now() + datetime.timedelta(days=365)
    expiration_gmt = expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST")

    # The functionality "only movies in english" of the site is broken on the
    # movie's "Latest updates" page (no titles are displayed).  If the option
    # "only_english" is enabled inthe addon preferences, the titles in other
    # languages are filtered out in the movies_updates() function.
    if plugintools.get_setting("only_english") == "true" and not url.endswith(
            '/movies-updates.html'):
        plugintools.log("movie4k.read_body_and_headers only english")
        headers.append([
            "Cookie", "onlylanguage=en; expires=" + expiration_gmt +
            "; xxx2=ok; expires=" + expiration_gmt + ";"
        ])
    else:  #TODO WHY else and not if get_settings(xxx == enabled)???
        headers.append(["Cookie", "xxx2=ok; expires=" + expiration_gmt + ";"])

    body, response_headers = "", ""
    try:
        body, response_headers = plugintools.read_body_and_headers(
            url, post, headers, follow_redirects, timeout)
        plugintools.log("movie4k.read_body_and_headers response_headers: " +
                        str(response_headers))
    except:
        plugintools.set_setting('clear_cache', 'true')
        import traceback
        plugintools.log("movie4k.read_body_and_headers unexpected error: " +
                        "".join(traceback.format_exception(*sys.exc_info())))
        xbmc.sleep(3000)
        try:
            support_string = "For support, report this error on " + FORUM_URL
            body, response_headers = plugintools.read_body_and_headers(
                url, post, headers, follow_redirects, timeout)
        except urllib2.HTTPError as e:
            xbmcgui.Dialog().ok(MYNAME, "HTTP error for " + MAIN_URL,
                                'Reason: ' + str(e.code) + ' ' + str(e.reason),
                                support_string)
        except urllib2.URLError as e:
            xbmcgui.Dialog().ok(MYNAME, "Connection failure for " + MAIN_URL,
                                'Reason: ' + str(e.reason), support_string)
        except:
            xbmcgui.Dialog().ok(
                MYNAME, "Unknown connection error: " + str(sys.exc_info()),
                support_string)
    return body, response_headers
예제 #11
0
def get_anonymous_account_or_request_new():

    # Obtiene el ID anónimo, o calcula uno si no lo tiene
    if plugintools.get_setting("account_anonymous_id")=="":
        result = accounts_get_new_anonymous_account()

        if not result["error"]:
            plugintools.set_setting( "account_anonymous_id" , result["body"]["anonymous_id"] )

    return plugintools.get_setting("account_anonymous_id")
예제 #12
0
def search(params):
    plugintools.log("soritvch.search " + repr(params))

    last_search = plugintools.get_setting("last_search")
    texto = plugintools.keyboard_input(last_search)
    plugintools.set_setting("last_search", texto)

    params["texto"] = texto

    youtube_search(params)
예제 #13
0
파일: api.py 프로젝트: codixor/maximumTv
def get_anonymous_account_or_request_new():

    # Obtiene el ID anónimo, o calcula uno si no lo tiene
    if plugintools.get_setting("account_anonymous_id") == "":
        result = accounts_get_new_anonymous_account()

        if not result["error"]:
            plugintools.set_setting("account_anonymous_id",
                                    result["body"]["anonymous_id"])

    return plugintools.get_setting("account_anonymous_id")
예제 #14
0
 def categorySelected(self):
     item = self.categoryList.getSelectedItem()
     if not item:
         return
     cat = item.getProperty('category')
     if not cat:
         self.category = None
     else:
         self.category = cat
     # self.setProperty('category',item.getLabel().strip('- '))
     plugintools.set_setting('mcLastCategory', cat)
     self.showPrograms(cat)
예제 #15
0
def general_playlists(params):
    plugintools.log("soritvch.general_playlists " + repr(params))
    #data2 = xbmcgui.Dialog().input("Search to youtube")
    last_search = plugintools.get_setting("last_search")
    data2 = plugintools.keyboard_input(last_search)
    if not data2:
        cap1 = plugintools.get_localized_string(50001)
        cap2 = plugintools.get_localized_string(50002)  # Canceled
        plugintools.message(cap1, cap2)
        exit = sys.exit()
        return exit
    data2 = data2.strip()
    plugintools.set_setting("last_search", data2)
    data2 = data2.replace(" ", "+")
    sch_lng = plugintools.get_setting("sch_lng")
    #plugintools.message("-",sch_lng)
    url = params.get("url") + data2 + "+" + sch_lng
    #xbmcgui.Dialog().ok("Search to youtube", url)

    try:
        data = plugintools.read(url)
    except:
        cap1 = plugintools.get_localized_string(50001)
        cap2 = plugintools.get_localized_string(50003)  # 0 Results
        plugintools.message(cap1, cap2)
        exit = sys.exit()
        return exit

    plugintools.log("data=" + data)
    pattern = '<h3 class="yt-lockup-title "><a href="(.*?)</h3>'
    matches = plugintools.find_multiple_matches(data, pattern)

    for entry in matches:
        plugintools.log("=====================================")
        plugintools.log("entry=" + entry)
        video_id = plugintools.find_single_match(entry, 'v=(.*?)" class')
        plugintools.log("video_id=" + video_id)
        title = plugintools.find_single_match(entry, 'dir="ltr">(.*?)</a>')
        title2 = plugintools.find_single_match(entry, '"> -(.*?).</span>')
        title = title + "[COLOR yellow]-" + title2 + "[/COLOR]"
        title = title.replace('&quot;', '"')
        title = title.strip()
        plot = ""
        thumbnail = "http://img.youtube.com/vi/" + video_id + "/0.jpg"
        url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + video_id
        plugintools.add_item(action="play",
                             title=title,
                             plot=plot,
                             url=url,
                             thumbnail=thumbnail,
                             isPlayable=False,
                             folder=False)
예제 #16
0
    def radio_update(self):
        # Update radiobutton caption on toggle
        # utils.log('entered radio update ' + str(listPos))
        # radioButton = self.listOfRadioButtons[listPos]
        radioButton = self.getFocus()
        for catName, radioButtonItem in self.radioMap.iteritems():
            if radioButton == radioButtonItem:
                label = catName

        if radioButton.isSelected():
            plugintools.set_setting(label, 'True')
        else:
            plugintools.set_setting(label, 'False')
예제 #17
0
    def run(self):
        self.window = MyAddon('script-category.xml',
                              utils.__addon__.getAddonInfo('path'),
                              'Main',
                              '720p',
                              manager=None)

        self.window.doModal()

        # self.window.onClosed()
        plugintools.set_setting('mcClosedTime', str(int(time.time())))
        del self.window
        self.window = None
예제 #18
0
def change_code():
	xbmc.executebuiltin('Dialog.Close(10140)')
	dialog = xbmcgui.Dialog()
	currentcode = plugintools.get_setting(sync_data("dmFuZW1ha29vZA=="))
	currentcodeinput = dialog.input(sync_data('UGxlYXNlIGVudGVyIHlvdXIgY3VycmVudCBQYXJlbnRhbCBDb2Rl'), type=xbmcgui.INPUT_NUMERIC, option=xbmcgui.ALPHANUM_HIDE_INPUT)
	if currentcodeinput == currentcode or currentcode == '':
		newcodeinput = dialog.input(sync_data('UGxlYXNlIHNldCB5b3VyIG5ldyBQYXJlbnRhbCBDb2Rl'), type=xbmcgui.INPUT_NUMERIC, option=xbmcgui.ALPHANUM_HIDE_INPUT)
		plugintools.set_setting(sync_data("dmFuZW1ha29vZA=="), newcodeinput)
		plugintools.set_setting(sync_data("dmFuZW1hbHVraw=="), 'true')
		plugintools.open_settings_dialog()
	else:
		xbmc.executebuiltin((u'XBMC.Notification("Parental-Lock Error!", "Incorrect code!", 3000)'))
		plugintools.open_settings_dialog()
		return
예제 #19
0
def bum_multiparser(params):
    plugintools.log('[%s %s] Iniciando BUM+ ... %s' %
                    (addonName, addonVersion, repr(params)))

    show = 'list'
    plugintools.modo_vista(show)

    try:
        texto = params.get("title")
        texto = texto.replace("[Multiparser]", "").replace(
            "[/COLOR]", "").replace("[I]", "").replace("[/I]", "").replace(
                "[COLOR white]", "").replace("[COLOR lightyellow]",
                                             "").strip()
        texto = texto + ' spanish'
        plugintools.set_setting("bum_search", texto)
        params["plot"] = texto
        texto = texto.lower().strip()
        texto = texto.replace("á", "a").replace("é", "e").replace(
            "í", "i").replace("ó",
                              "o").replace("ú",
                                           "u").replace("ñ",
                                                        "n").replace(" ", "+")
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            url = 'https://kickass.to/usearch/' + texto + '/'  # Kickass
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.kickass.to'
            kickass1_bum(params)
            url = 'http://bitsnoop.com/search/all/' + texto + '/c/d/1/'  # BitSnoop
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1_bum(params)
            url = 'https://isohunt.to/torrents/?ihq=' + texto + '&Torrent_sort=seeders.desc'  # Isohunt
            params["url"] = url
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1_bum(params)
            url = 'https://www.monova.org/search.php?sort=5&term=' + texto + '&verified=1'  # Monova
            params["url"] = url
            url = params.get("url")
            referer = 'https://monova.org'
            monova1_bum(params)

    except:
        pass
예제 #20
0
def show_mc():
    closedTime = plugintools.get_setting('mcClosedTime')
    if closedTime == None or closedTime == '':
        plugintools.set_setting('mcClosedTime', '0')
    closedTime = int((plugintools.get_setting('mcClosedTime')))
    timeDiff = time.time() - closedTime
    mc_quittimer = plugintools.get_setting('mc_quittimer')
    if time.time() - closedTime > int(mc_quittimer):
        endOfDirectory(plugin.handle)
        vaderClass.startMCC()
    else:

        endOfDirectory(plugin.handle)
        xbmc.executebuiltin('Action(Back)')
예제 #21
0
파일: default.py 프로젝트: bialagary/mw
def main_list(params):
    plugintools.log("ruyaiptv.main_list "+repr(params))

    if plugintools.get_setting("username")=="":
        settings(params)

    token = api.login( plugintools.get_setting("server") , plugintools.get_setting("username") , plugintools.get_setting("password") )

    if token!="":
        plugintools.set_setting("token",token)
        import os
        plugintools.add_item( action="movies",   title="Movies" , thumbnail = os.path.join(THUMBNAIL_PATH,"thumb0.png") , fanart=os.path.join(THUMBNAIL_PATH,"fanart0.jpg") , folder=True )
        plugintools.add_item( action="tvshows",  title="TV Shows" , thumbnail = os.path.join(THUMBNAIL_PATH,"thumb1.png") , fanart=os.path.join(THUMBNAIL_PATH,"fanart1.jpg") , folder=True )
        plugintools.add_item( action="livetv",   title="Live TV" , thumbnail = os.path.join(THUMBNAIL_PATH,"thumb2.png") , fanart=os.path.join(THUMBNAIL_PATH,"fanart2.jpg") , folder=True )
        plugintools.add_item( action="livetv_catchup",   title="Catch-up TV" , thumbnail = os.path.join(THUMBNAIL_PATH,"thumb2.png") , fanart=os.path.join(THUMBNAIL_PATH,"fanart2.jpg") , folder=True )
    else:
        plugintools.message("RuYa IPTV","Invalid login, check your account in add-on settings")

    import os
    plugintools.add_item( action="settings", title="Settings..." , thumbnail = os.path.join(THUMBNAIL_PATH,"thumb3.png") , fanart=os.path.join(THUMBNAIL_PATH,"fanart3.jpg") , folder=False )

    if plugintools.get_setting("force_advancedsettings")=="true":
        # Ruta del advancedsettings
        import xbmc,xbmcgui,os
        advancedsettings = xbmc.translatePath("special://userdata/advancedsettings.xml")

        if not os.path.exists(advancedsettings):
            # Copia el advancedsettings.xml desde el directorio resources al userdata
            fichero = open( os.path.join(plugintools.get_runtime_path(),"resources","advancedsettings.xml") )
            texto = fichero.read()
            fichero.close()
            
            fichero = open(advancedsettings,"w")
            fichero.write(texto)
            fichero.close()

            plugintools.message("plugin", "A new file userdata/advancedsettings.xml","has been created for optimal streaming")

    if token!="" and plugintools.get_setting("check_for_updates")=="true":
        import updater
        updater.check_for_updates()

    plugintools.set_view( plugintools.LIST )
예제 #22
0
def bum(params):
    plugintools.log("[movie.ultra.7k 0.3.0].BUM+" + repr(params))

    try:
        texto = params.get("title")
        texto = texto.replace("[Multiparser]", "").replace(
            "[/COLOR]", "").replace("[I]", "").replace("[/I]", "").replace(
                "[COLOR white]", "").replace("[COLOR lightyellow]",
                                             "").strip()
        texto = texto + ' spanish'
        plugintools.set_setting("bum_search", texto)
        params["plot"] = texto
        texto = texto.lower().strip()
        texto = texto.replace(" ", "+")
        if texto == "":
            errormsg = plugintools.message(
                "Movie Ultra 7K", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            url = 'https://kickass.to/usearch/' + texto + '/'  # Kickass
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.kickass.to'
            kickass_results(params)
            url = 'http://bitsnoop.com/search/all/' + texto + '/c/d/1/'  # BitSnoop
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1(params)
            url = 'https://isohunt.to/torrents/?ihq=' + texto + '&Torrent_sort=seeders.desc'  # Isohunt
            params["url"] = url
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1(params)
            url = 'https://www.monova.org/search.php?sort=5&term=' + texto + '&verified=1'  # Monova
            params["url"] = url
            url = params.get("url")
            referer = 'https://monova.org'
            monova1(params)

    except:
        pass
예제 #23
0
def change_code():
    xbmc.executebuiltin('Dialog.Close(10140)')
    dialog = xbmcgui.Dialog()
    currentcode = plugintools.get_setting("vanemakood")
    currentcodeinput = dialog.input("Please enter your current Parental Code",
                                    type=xbmcgui.INPUT_NUMERIC,
                                    option=xbmcgui.ALPHANUM_HIDE_INPUT)
    if currentcodeinput == currentcode or currentcode == '':
        newcodeinput = dialog.input("Please set your new Parental Code",
                                    type=xbmcgui.INPUT_NUMERIC,
                                    option=xbmcgui.ALPHANUM_HIDE_INPUT)
        plugintools.set_setting("vanemakood", newcodeinput)
        plugintools.set_setting("vanemalukk", 'true')
        plugintools.open_settings_dialog()
    else:
        xbmc.executebuiltin((
            u'XBMC.Notification("Parental-Lock Error!", "Incorrect code!", 3000)'
        ))
        plugintools.open_settings_dialog()
        return
예제 #24
0
def bum_multiparser(params):
    plugintools.log('[%s %s] Iniciando BUM+ ... %s' % (addonName, addonVersion, repr(params)))

    show = 'list'
    plugintools.modo_vista(show)    

    try:
        texto = params.get("title")
        texto = texto.replace("[Multiparser]", "").replace("[/COLOR]", "").replace("[I]", "").replace("[/I]", "").replace("[COLOR white]", "").replace("[COLOR lightyellow]", "").strip()
        texto = texto+' spanish'
        plugintools.set_setting("bum_search",texto)
        params["plot"]=texto
        texto = texto.lower().strip()
        texto = texto.replace("á", "a").replace("é", "e").replace("í", "i").replace("ó", "o").replace("ú", "u").replace("ñ", "n").replace(" ", "+")
        if texto == "":
            errormsg = plugintools.message("Arena+","Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            url = 'https://kickass.to/usearch/'+texto+'/'  # Kickass
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.kickass.to'
            kickass1_bum(params)
            url = 'http://bitsnoop.com/search/all/'+texto+'/c/d/1/'  # BitSnoop
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1_bum(params)
            url = 'https://isohunt.to/torrents/?ihq='+texto+'&Torrent_sort=seeders.desc'  # Isohunt
            params["url"]=url            
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1_bum(params)
            url = 'https://www.monova.org/search.php?sort=5&term='+texto+'&verified=1'  # Monova
            params["url"]=url            
            url = params.get("url")
            referer = 'https://monova.org'
            monova1_bum(params) 

    except:
         pass  
예제 #25
0
파일: default.py 프로젝트: c0ns0le/YCBuilds
def read_body_and_headers(url, post=None, headers=[], follow_redirects=True, timeout=None):
    plugintools.log("movie4k.read_body_and_headers url="+url)

    # Spoof user agent ID
    headers.append(["User-Agent","Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0"])

    expiration = datetime.datetime.now() + datetime.timedelta(days=365)
    expiration_gmt = expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST")

    # The functionality "only movies in english" of the site is broken on the
    # movie's "Latest updates" page (no titles are displayed).  If the option
    # "only_english" is enabled inthe addon preferences, the titles in other
    # languages are filtered out in the movies_updates() function.
    if plugintools.get_setting("only_english")=="true" and not url.endswith('/movies-updates.html'):
        plugintools.log("movie4k.read_body_and_headers only english")
        headers.append(["Cookie","onlylanguage=en; expires="+expiration_gmt+"; xxx2=ok; expires="+expiration_gmt+";"])
    else: #TODO WHY else and not if get_settings(xxx == enabled)???
        headers.append(["Cookie","xxx2=ok; expires="+expiration_gmt+";"])

    body, response_headers = "", ""
    try:
        body,response_headers = plugintools.read_body_and_headers(url,post,headers,follow_redirects,timeout)
        plugintools.log("movie4k.read_body_and_headers response_headers: " + str(response_headers))
    except:
        plugintools.set_setting('clear_cache', 'true')
        import traceback
        plugintools.log("movie4k.read_body_and_headers unexpected error: " + "".join(traceback.format_exception(*sys.exc_info())))
        xbmc.sleep(3000)
        try:
            support_string = "For support, report this error on " + FORUM_URL
            body, response_headers = plugintools.read_body_and_headers(url,post,headers,follow_redirects,timeout)
        except urllib2.HTTPError as e:
            xbmcgui.Dialog().ok(MYNAME, "HTTP error for " + MAIN_URL, 'Reason: ' + str(e.code) + ' ' + str(e.reason), support_string)
        except urllib2.URLError as e:
            xbmcgui.Dialog().ok(MYNAME, "Connection failure for " + MAIN_URL, 'Reason: ' + str(e.reason), support_string)
        except:
            xbmcgui.Dialog().ok(MYNAME, "Unknown connection error: " + str(sys.exc_info()), support_string)
    return body, response_headers
예제 #26
0
def main_list(params):
    plugintools.log("dandb.main_list "+repr(params))

    if plugintools.get_setting("user")=="":
        settings(params)

    token = api.users_login( plugintools.get_setting("user") , plugintools.get_setting("password") )

    if token!="":
        plugintools.set_setting("token",token)
        import os
        itemlist = api.navigation_get_all("mainlist",0,1000)
        add_items_to_xbmc(params,itemlist)
    else:
        plugintools.message("D&B TV","Invalid login, check your account in add-on settings")

    import os
    plugintools.add_item( action="settings", title="Settings..." , folder=False )

    if token!="" and plugintools.get_setting("check_for_updates")=="true":
        import updater
        updater.check_for_updates()

    plugintools.set_view( plugintools.LIST )
예제 #27
0
def mundoplus0(params):
    
    try:
        texto = "";
        texto='strain'
        texto = plugintools.keyboard_input(texto)
        plugintools.set_setting("mundoplus_search",texto)
        params["plot"]=texto
        texto = texto.lower()        
        if texto == "": errormsg = plugintools.message("PalcoTV","Por favor, introduzca serie a buscar");return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            url = 'http://www.mundoplus.tv/programacion/buscador.php?canal=g_todos&fecha=TODAS&buscar='+texto
            #url = 'http://www.alluc.com/stream/'+texto+'++lang:es'
            #url=baseurl+'stream/?q='+texto+'&stream=Streams'
            #url=baseurl+'stream/'+texto
            params["url"]=url
            url = params.get("url")
            referer = 'http://www.mundoplus.tv'
            plugintools.log("Texto a buscar: "+title)
            mundoplus1(params)

    except: pass
예제 #28
0
def search5(params):
    dialog = xbmcgui.Dialog()
    selector = dialog.select('WATCH IPTV PLUS',
                             ['BUSQUEDA POR CANCION', 'BUSQUEDA POR ARTISTA'])
    if selector == 0:
        texto = plugintools.keyboard_input()
        plugintools.set_setting("last_search", texto)
        busqueda = 'http://www.goear.com/apps/android/search_songs_json.php?q=' + texto
        busqueda = busqueda.replace(' ', "+")
        data = gethttp_referer_headers(busqueda, referer)
        if "id" in data:
            plugintools.log("busqueda= " + busqueda)
            songs = plugintools.find_multiple_matches(data, '{(.*?)}')
            for entry in songs:
                plugintools.log("entry= " + entry)
                id_song = plugintools.find_single_match(entry, '"id":"([^"]+)')
                plugintools.log("id_song= " + id_song)
                title_song = plugintools.find_single_match(
                    entry, '"title":"([^"]+)')
                title_song = title_song.upper()
                plugintools.log("title_song= " + title_song)
                songtime = plugintools.find_single_match(
                    entry, '"songtime":"([^"]+)')
                plugintools.log("songtime= " + songtime)
                url = 'http://www.goear.com/action/sound/get/' + id_song
                plugintools.log("url= " + url)
                plugintools.add_item(action="play2",
                                     title=title_song + " " +
                                     '[COLOR orange] (' + songtime +
                                     ')[/COLOR]',
                                     url=url,
                                     thumbnail=thumbnail,
                                     fanart="",
                                     folder=False,
                                     isPlayable=True)
        elif "0" in data:
            errormsg = plugintools.message("WATCH IPTV PLUS", "SIN RESULTADOS")
            search5(params)
    if selector == 1:
        texto = plugintools.keyboard_input()
        plugintools.set_setting("last_search", texto)
        url = 'http://www.goear.com/apps/android/search_playlist_json.php?q=' + texto
        plugintools.log("url= " + url)
        url2 = url.replace(' ', "+")
        data = gethttp_referer_headers(url2, referer)
        if "id" in data:
            songs = plugintools.find_multiple_matches(data, '{(.*?)}')
            i = 1
            for entry in songs:
                plugintools.log("entry= " + entry)
                id_song = plugintools.find_single_match(entry, '"id":"([^"]+)')
                plugintools.log("id_song= " + id_song)
                url = 'http://www.goear.com/apps/android/playlist_songs_json.php?v=' + id_song
                title_song = plugintools.find_single_match(
                    entry, '"title":"([^"]+)')
                title_song = title_song.upper()
                plugintools.log("title_song= " + title_song)
                plsongs = plugintools.find_single_match(
                    entry, '"plsongs":"([^"]+)"')
                songtime = plugintools.find_single_match(
                    entry, '"songtime":"([^"]+)')
                plugintools.add_item(action="songs2",
                                     title=title_song + " " + '[COLOR red](' +
                                     plsongs + ')[/COLOR]' + 'ITEMS' +
                                     '[COLOR orange] (' + songtime +
                                     ')[/COLOR]' + 'DURACION',
                                     url=url,
                                     thumbnail=lista,
                                     fanart="",
                                     folder=True,
                                     isPlayable=False)
                i = i + 1
        elif "0" in data:
            errormsg = plugintools.message("WATCH IPTV PLUS", "SIN RESULTADOS")
            search5(params)
예제 #29
0
def bum_multiparser(params):
    plugintools.log('[%s %s] Iniciando BUM+ ... %s' % (addonName, addonVersion, repr(params)))

    # Archivo de control de resultados
    bumfile = temp + 'bum.dat'
    if not os.path.isfile(bumfile):  # Si no existe el archivo de control, se crea y se anotan resultados de la búsqueda
        controlbum = open(bumfile, "wb")
        controlbum.close()    

    try:
        texto = params.get("title")
        texto = texto.replace("[Multiparser]", "").replace("[/COLOR]", "").replace("[I]", "").replace("[/I]", "").replace("[COLOR white]", "").replace("[COLOR lightyellow]", "").strip()
        lang = plugintools.get_setting("bum_lang")
        if lang == '0':
            lang = ""            
        elif lang == '1':
            lang = 'spanish'
        elif lang == '2':
            lang = 'english'
        elif lang == '3':
            lang = 'french'
        elif lang == '4':
            lang = 'german'
        elif lang == '5':
            lang = 'latino'

        if lang != "": texto = texto+' ' + lang
        else: texto=texto.strip()
        
        plugintools.set_setting("bum_search",texto)
        params["plot"]=texto
        texto = texto.lower().strip()
        texto = texto.replace("á", "a").replace("é", "e").replace("í", "i").replace("ó", "o").replace("ú", "u").replace("ñ", "n")
        if texto == "":
            errormsg = plugintools.message("PalcoTV","Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            url = 'https://kat.cr/usearch/'+texto+'/'  # Kickass
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.kat.cr'
            kickass1_bum(params)            
            url = 'http://bitsnoop.com/search/all/'+texto+'/c/d/1/'  # BitSnoop
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.bitsnoop.com'
            bitsnoop1_bum(params)
            url = 'https://isohunt.to/torrents/?ihq='+texto.replace(" ", "+").strip()+'&Torrent_sort=-seeders'  # Isohunt
            params["url"]=url            
            url = params.get("url")
            referer = 'https://isohunt.to'
            isohunt1_bum(params)
            url = 'http://www.limetorrents.co/search/all/'+texto.replace(" ", "+").strip()+'/seeds/1/'
            params["url"]=url
            limetorrents0(params)            
            #url = 'https://www.monova.org/search?term='+texto.replace(" ", "+")+'&cat=&page=1&sort=1&verified=1'  # Monova
            #params["url"]=url            
            #monova1_bum(params)
            
    except:
         pass

        
    controlbum = open(bumfile, "r")
    num_items = len(controlbum.readlines())
    fanart = 'http://images5.fanpop.com/image/photos/29400000/Massive-B-Horror-Collage-Wallpaper-horror-movies-29491579-2560-1600.jpg'

    i = -1
    controlbum.seek(0)
    while i <= num_items:        
        data = controlbum.readline()
        if data.startswith("EOF") == True:
            break
        elif data.startswith("Title") == True:
            title=data.replace("Title: ", "")
            url=controlbum.readline();url=url.replace("URL: ","")
            thumbnail=controlbum.readline();thumbnail=thumbnail.replace("Thumbnail: ", "").strip()
            seeds=controlbum.readline();seeds=seeds.replace("Seeds: ", "").replace(",", "").replace(".", "").strip();seeds=int(seeds);plugintools.log("seeds= "+str(seeds))
            size=controlbum.readline();size=size.replace("Size: ", "").strip();print size
            seeds_min=plugintools.get_setting("bum_seeds");seeds_min=int(seeds_min);plugintools.log("seeds_min= "+str(seeds_min))
            if int(seeds) >= int(seeds_min):
                if thumbnail == "":
                    thumbnail = art + 'bum.png'                
                if title.endswith("[Kickass][/I][/COLOR]") >= 0:
                    plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=True)
                    i=i+1
                    print i
                    continue
                elif title.endswith("[BitSnoop][/I][/COLOR]") >= 0:
                    plugintools.add_item(action="bitsnoop2_bum", title=title, url=url, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=True)
                    i=i+1
                    print i
                    continue
                elif title.endswith("[IsoHunt][/I][/COLOR]") >= 0:
                    plugintools.add_item(action="isohunt2_bum", title=title, url=url, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=True)
                    i=i+1
                    print i
                    continue
                elif title.endswith("[LimeTorrents][/I][/COLOR]") >= 0:
                    plugintools.add_item(action="limetorrents1", title=title, url=url, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=True)
                    i=i+1
                    print i
                    continue            
        else:
            i=i+1
            continue

    controlbum.close()
    xbmcplugin.addSortMethod(int(sys.argv[1]), 2)
    
    # Eliminamos archivo de registro
    try:
        if os.path.exists(bumfile):
            os.remove(bumfile)
    except: pass
예제 #30
0
plugintools.log("mega.init")

logged = False
tos_accepted = False

if plugintools.get_setting("tos_accepted") == "false":
    dialog = xbmcgui.Dialog()
    tos_accepted = dialog.yesno(
        "Please read terms of service",
        "http://g.static.mega.co.nz/pages/terms.html",
        "Please read terms of service on the URL above",
        "and accept them to continue")

    if tos_accepted:
        plugintools.set_setting("tos_accepted", "true")

else:
    tos_accepted = True

if tos_accepted:
    maindialog = xbmcgui.DialogProgress()
    maindialog.create('Accessing MEGA', 'Initializing...')
    progress = 0
    maindialog.update(progress)

    # Get the platform and architecture
    system_platform = 'Unknown'
    architecture = ''

    # struct.calcsize("P") is 4 or 8 for 32 or 64 bit Python repectively
예제 #31
0
HOSTERS_BLACKLIST = [
]  # ["filenuke", "divxstage", "streamclou", "xvidstage", "rapidvideo"]

if plugintools.get_setting("use_anonymizer_site") == "true":
    ANON_URL = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'
    MAIN_URL = ANON_URL + 'http://www.movie4k.to/'
elif plugintools.get_setting("use_alternative_site_url") == "true":
    MAIN_URL = plugintools.get_setting("alternative_site_url")
    if MAIN_URL[-1] != '/':
        MAIN_URL += '/'
else:
    MAIN_URL = 'http://www.movie4k.to/'

if plugintools.get_setting('clear_cache') == 'true':
    plugin.clear_function_cache()
    plugintools.set_setting('clear_cache', 'false')
    plugintools.log("movie4k clear cache")


# Entry point
def run():
    plugintools.log("movie4k.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action + "(params)"
예제 #32
0
파일: api.py 프로젝트: codixor/maximumTv
def get_session_token():
    plugintools.log("tvalacarta.api.get_session_token")

    # No tiene sesión
    if plugintools.get_setting("account_session") == "":

        # Si no tiene email y password, es un login anónimo
        if plugintools.get_setting(
                "account_email") == "" or plugintools.get_setting(
                    "account_password") == "":

            plugintools.set_setting("account_type_registered", "0")

            # Obtiene el ID anónimo, o calcula uno si no lo tiene
            get_anonymous_account_or_request_new()

            # Hace el login anónimo
            result = accounts_login()

            if not result["error"]:
                plugintools.set_setting("account_session", result["body"]["s"])
            else:
                # Si el login anonimo no funciona, lo borra para que se pueda volver a generar
                plugintools.set_setting("account_anonymous_id", "")
                plugintools.set_setting("account_session", "")

        # Si tiene email y password, es un login normal
        else:
            result = accounts_login(
                plugintools.get_setting("account_email"),
                plugintools.get_setting("account_password"))

            if not result["error"]:
                plugintools.set_setting("account_session", result["body"]["s"])
                # El login ha sido bueno, borra el id anónimo si lo hubiera porque ya no es necesario
                plugintools.set_setting("account_type_registered", "1")
                plugintools.set_setting("account_anonymous_id", "")
            else:
                plugintools.set_setting("account_session", "")

    return plugintools.get_setting("account_session")
예제 #33
0
def kickass0_bum(params):
    plugintools.log('[%s %s] [BUM+] Kickass... %s' % (addonName, addonVersion, repr(params)))

    try:
        texto = "";
        #texto='riddick'
        texto = plugintools.keyboard_input(texto, "Buscador Unificado de Torrents (BUM+)")
        plugintools.set_setting("alluc_search",texto)
        params["plot"]=texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message("Arena+","Por favor, introduzca el canal a buscar")
            #return errormsg
        else:           
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            # https://kickass.to/usearch/birdman%20lang_id:14/
            url = 'https://kickass.to/usearch/'+texto+'/'
            params["url"]=url            
            url = params.get("url")
            referer = 'http://www.kickass.to'            
    except:
         pass      

    # Archivo de control de resultados (evita la recarga del cuadro de diálogo de búsqueda tras cierto tiempo)
    bumfile = tmp + 'bum.dat'
    if not os.path.isfile(bumfile):  # Si no existe el archivo de control, se crea y se registra la búsqueda
        controlbum = open(bumfile, "a")
        controlbum.close()
        ahora = datetime.now()
        print 'ahora',ahora
        anno_actual = ahora.year
        mes_actual = ahora.month
        hora_actual = ahora.hour
        min_actual = ahora.minute
        seg_actual = ahora.second
        hoy = ahora.day
        # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
        if hoy <= 9:
            hoy = "0" + str(hoy)
        if mes_actual <= 9:
            mes_actual = "0" + str(ahora.month)
        timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(hora_actual) + str(min_actual) + str(seg_actual)
        controlbum = open(tmp + 'bum.dat', "wb")
        controlbum.seek(0)
        controlbum.write(timestamp+":"+texto)
        controlbum.close()
    else:
        controlbum = open(tmp + 'bum.dat', "r")
        controlbum.seek(0)
        data = controlbum.readline()
        controlbum.close()        
        plugintools.log("BUM+= "+data)           
        plugintools.log("Control de BUM+ activado. Analizamos timestamp...")
        data = data.split(":")
        timestamp = data[0]
        term_search = data[1]
        ahora = datetime.now()
        print 'ahora',ahora
        anno_actual = ahora.year
        mes_actual = ahora.month
        hora_actual = ahora.hour
        min_actual = ahora.minute
        seg_actual = ahora.second
        hoy = ahora.day
        # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
        if hoy <= 9:
            hoy = "0" + str(hoy)
        if mes_actual <= 9:
            mes_actual = "0" + str(ahora.month)
        timenow = str(ahora.year) + str(mes_actual) + str(hoy) + str(hora_actual) + str(min_actual) + str(seg_actual)
        # Comparamos valores (hora actual y el timestamp del archivo de control)
        if term_search == texto:
            result = int(timenow) - int(timestamp)
            print 'result',result
            if result > 90:  # Control fijado en 90 segundos; esto significa que una misma búsqueda no podremos realizarla en menos de 90 segundos, y en ese tiempo debe reproducirse el torrent
                # Borramos registro actual y guardamos el nuevo (crear una función que haga esto y no repetir!)
                ahora = datetime.now()
                print 'ahora',ahora
                anno_actual = ahora.year
                mes_actual = ahora.month
                hora_actual = ahora.hour
                min_actual = ahora.minute
                seg_actual = ahora.second
                hoy = ahora.day
                # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
                if hoy <= 9:
                    hoy = "0" + str(hoy)
                if mes_actual <= 9:
                    mes_actual = "0" + str(ahora.month)
                timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(hora_actual) + str(min_actual) + str(seg_actual)
                controlbum = open(tmp + 'bum.dat', "wb")
                controlbum.seek(0)
                controlbum.write(timestamp+":"+texto)
                controlbum.close()                
                kickass_results(params)
            else:
                plugintools.log("Recarga de página")
                kickass_results(params)
        else:
            # Borramos registro actual y guardamos el nuevo (crear una función que haga esto y no repetir!)
            ahora = datetime.now()
            print 'ahora',ahora
            anno_actual = ahora.year
            mes_actual = ahora.month
            hora_actual = ahora.hour
            min_actual = ahora.minute
            seg_actual = ahora.second
            hoy = ahora.day
            # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
            if hoy <= 9:
                hoy = "0" + str(hoy)
            if mes_actual <= 9:
                mes_actual = "0" + str(ahora.month)
            timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(hora_actual) + str(min_actual) + str(seg_actual)
            controlbum = open(tmp + 'bum.dat', "wb")
            controlbum.seek(0)
            controlbum.write(timestamp+":"+texto)
            controlbum.close()                
            kickass1_bum(params)
예제 #34
0
def get_session_token():
    plugintools.log("tvalacarta.api.get_session_token")

    # No tiene sesión
    if plugintools.get_setting("account_session")=="":

        # Si no tiene email y password, es un login anónimo
        if plugintools.get_setting("account_email")=="" or plugintools.get_setting("account_password")=="":

            plugintools.set_setting( "account_type_registered" , "0")

            # Obtiene el ID anónimo, o calcula uno si no lo tiene
            get_anonymous_account_or_request_new()

            # Hace el login anónimo
            result = accounts_login()

            if not result["error"]:
                plugintools.set_setting( "account_session" , result["body"]["s"] )
            else:
                # Si el login anonimo no funciona, lo borra para que se pueda volver a generar
                plugintools.set_setting( "account_anonymous_id" , "" )
                plugintools.set_setting( "account_session" , "" )

        # Si tiene email y password, es un login normal
        else:
            result = accounts_login( plugintools.get_setting("account_email") , plugintools.get_setting("account_password") )

            if not result["error"]:
                plugintools.set_setting( "account_session" , result["body"]["s"] )
                # El login ha sido bueno, borra el id anónimo si lo hubiera porque ya no es necesario
                plugintools.set_setting( "account_type_registered" , "1")
                plugintools.set_setting( "account_anonymous_id" , "" )
            else:
                plugintools.set_setting( "account_session" , "" )

    return plugintools.get_setting("account_session")
예제 #35
0
파일: default.py 프로젝트: c0ns0le/YCBuilds
plugintools.http_debug_log_enabled = (plugintools.get_setting("debug")=="true")
HOSTERS_BLACKLIST = [] # ["filenuke", "divxstage", "streamclou", "xvidstage", "rapidvideo"]

if plugintools.get_setting("use_anonymizer_site")=="true":
    ANON_URL = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'
    MAIN_URL = ANON_URL + 'http://www.movie4k.to/'
elif plugintools.get_setting("use_alternative_site_url")=="true":
    MAIN_URL = plugintools.get_setting("alternative_site_url")
    if MAIN_URL[-1] != '/':
        MAIN_URL += '/'
else:
    MAIN_URL = 'http://www.movie4k.to/'

if plugintools.get_setting('clear_cache') == 'true':
    plugin.clear_function_cache()
    plugintools.set_setting('clear_cache', 'false')
    plugintools.log("movie4k clear cache")

# Entry point
def run():
    plugintools.log("movie4k.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
예제 #36
0
def kickass0_bum(params):
    plugintools.log('[%s %s] [BUM+] Kickass... %s' %
                    (addonName, addonVersion, repr(params)))

    try:
        texto = ""
        #texto='riddick'
        texto = plugintools.keyboard_input(
            texto, "Buscador Unificado de Torrents (BUM+)")
        plugintools.set_setting("alluc_search", texto)
        params["plot"] = texto
        texto = texto.lower()
        if texto == "":
            errormsg = plugintools.message(
                "Arena+", "Por favor, introduzca el canal a buscar")
            #return errormsg
        else:
            texto = texto.lower().strip()
            texto = texto.replace(" ", "+")
            # https://kickass.to/usearch/birdman%20lang_id:14/
            url = 'https://kickass.to/usearch/' + texto + '/'
            params["url"] = url
            url = params.get("url")
            referer = 'http://www.kickass.to'
    except:
        pass

    # Archivo de control de resultados (evita la recarga del cuadro de diálogo de búsqueda tras cierto tiempo)
    bumfile = tmp + 'bum.dat'
    if not os.path.isfile(
            bumfile
    ):  # Si no existe el archivo de control, se crea y se registra la búsqueda
        controlbum = open(bumfile, "a")
        controlbum.close()
        ahora = datetime.now()
        print 'ahora', ahora
        anno_actual = ahora.year
        mes_actual = ahora.month
        hora_actual = ahora.hour
        min_actual = ahora.minute
        seg_actual = ahora.second
        hoy = ahora.day
        # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
        if hoy <= 9:
            hoy = "0" + str(hoy)
        if mes_actual <= 9:
            mes_actual = "0" + str(ahora.month)
        timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(
            hora_actual) + str(min_actual) + str(seg_actual)
        controlbum = open(tmp + 'bum.dat', "wb")
        controlbum.seek(0)
        controlbum.write(timestamp + ":" + texto)
        controlbum.close()
    else:
        controlbum = open(tmp + 'bum.dat', "r")
        controlbum.seek(0)
        data = controlbum.readline()
        controlbum.close()
        plugintools.log("BUM+= " + data)
        plugintools.log("Control de BUM+ activado. Analizamos timestamp...")
        data = data.split(":")
        timestamp = data[0]
        term_search = data[1]
        ahora = datetime.now()
        print 'ahora', ahora
        anno_actual = ahora.year
        mes_actual = ahora.month
        hora_actual = ahora.hour
        min_actual = ahora.minute
        seg_actual = ahora.second
        hoy = ahora.day
        # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
        if hoy <= 9:
            hoy = "0" + str(hoy)
        if mes_actual <= 9:
            mes_actual = "0" + str(ahora.month)
        timenow = str(ahora.year) + str(mes_actual) + str(hoy) + str(
            hora_actual) + str(min_actual) + str(seg_actual)
        # Comparamos valores (hora actual y el timestamp del archivo de control)
        if term_search == texto:
            result = int(timenow) - int(timestamp)
            print 'result', result
            if result > 90:  # Control fijado en 90 segundos; esto significa que una misma búsqueda no podremos realizarla en menos de 90 segundos, y en ese tiempo debe reproducirse el torrent
                # Borramos registro actual y guardamos el nuevo (crear una función que haga esto y no repetir!)
                ahora = datetime.now()
                print 'ahora', ahora
                anno_actual = ahora.year
                mes_actual = ahora.month
                hora_actual = ahora.hour
                min_actual = ahora.minute
                seg_actual = ahora.second
                hoy = ahora.day
                # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
                if hoy <= 9:
                    hoy = "0" + str(hoy)
                if mes_actual <= 9:
                    mes_actual = "0" + str(ahora.month)
                timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(
                    hora_actual) + str(min_actual) + str(seg_actual)
                controlbum = open(tmp + 'bum.dat', "wb")
                controlbum.seek(0)
                controlbum.write(timestamp + ":" + texto)
                controlbum.close()
                kickass_results(params)
            else:
                plugintools.log("Recarga de página")
                kickass_results(params)
        else:
            # Borramos registro actual y guardamos el nuevo (crear una función que haga esto y no repetir!)
            ahora = datetime.now()
            print 'ahora', ahora
            anno_actual = ahora.year
            mes_actual = ahora.month
            hora_actual = ahora.hour
            min_actual = ahora.minute
            seg_actual = ahora.second
            hoy = ahora.day
            # Si el día o mes está entre el 1 y 9, nos devuelve un sólo dígito, así que añadimos un 0 (cero) delante:
            if hoy <= 9:
                hoy = "0" + str(hoy)
            if mes_actual <= 9:
                mes_actual = "0" + str(ahora.month)
            timestamp = str(ahora.year) + str(mes_actual) + str(hoy) + str(
                hora_actual) + str(min_actual) + str(seg_actual)
            controlbum = open(tmp + 'bum.dat', "wb")
            controlbum.seek(0)
            controlbum.write(timestamp + ":" + texto)
            controlbum.close()
            kickass1_bum(params)
예제 #37
0
파일: default.py 프로젝트: noba3/KoTos
import xbmc
import xbmcgui

import plugintools

plugintools.log("mega.init")

logged = False
tos_accepted = False

if plugintools.get_setting("tos_accepted")=="false":
    dialog = xbmcgui.Dialog()
    tos_accepted = dialog.yesno("Please read terms of service", "http://g.static.mega.co.nz/pages/terms.html", "Please read terms of service on the URL above","and accept them to continue")

    if tos_accepted:
        plugintools.set_setting("tos_accepted","true")

else:
    tos_accepted = True

if tos_accepted:
    maindialog = xbmcgui.DialogProgress()
    maindialog.create('Accessing MEGA', 'Initializing...')
    progress = 0
    maindialog.update(progress)

    # Get the platform and architecture
    system_platform = 'Unknown'
    architecture = ''

    # struct.calcsize("P") is 4 or 8 for 32 or 64 bit Python repectively