Python urllib.unquote_plus() Examples

The following are code examples for showing how to use urllib.unquote_plus(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: pyblish-win   Author: pyblish   File: test_urllib.py    GNU Lesser General Public License v3.0 6 votes vote down vote up
def test_unquoting(self):
        # Make sure unquoting of all ASCII values works
        escape_list = []
        for num in range(128):
            given = hexescape(chr(num))
            expect = chr(num)
            result = urllib.unquote(given)
            self.assertEqual(expect, result,
                             "using unquote(): %s != %s" % (expect, result))
            result = urllib.unquote_plus(given)
            self.assertEqual(expect, result,
                             "using unquote_plus(): %s != %s" %
                             (expect, result))
            escape_list.append(given)
        escape_string = ''.join(escape_list)
        del escape_list
        result = urllib.unquote(escape_string)
        self.assertEqual(result.count('%'), 1,
                         "using quote(): not all characters escaped; %s" %
                         result)
        result = urllib.unquote(escape_string)
        self.assertEqual(result.count('%'), 1,
                         "using unquote(): not all characters escaped: "
                         "%s" % result) 
Example 2
Project: plugin.program.steam.streaming   Author: Drakulix   File: listGames.py    MIT License 6 votes vote down vote up
def listGames(params, update=False):
    hostname = urllib.unquote_plus(params.get('hostname'))
    username = urllib.unquote_plus(params.get('username'))

    with Service() as service:
        apps = service.get_apps((hostname, username))
        for app_id, app in apps.iteritems():
            try:
                if app["is_steam_game"]:
                    utils.addGame(app["name"], app_id, app["state"], username, hostname, "http://cdn.akamai.steamstatic.com/steam/apps/"+str(app_id)+"/header.jpg", "http://cdn.store.steampowered.com/fulldetailsheader/"+str(app_id)+"/header.jpg")
                else:
                    utils.addGame(app["name"], app_id, app["state"], username, hostname)
            except Exception as e:
                utils.addGame("Unknown", app_id, app["state"], username, hostname)

    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE)
    xbmcplugin.endOfDirectory(pluginhandle, updateListing=update, cacheToDisc=False) 
Example 3
Project: plugin.program.steam.streaming   Author: Drakulix   File: status.py    MIT License 6 votes vote down vote up
def status(service, params):
    app_id = int(params.get('id'))
    username = urllib.unquote_plus(params.get('username'))
    hostname = urllib.unquote_plus(params.get('hostname'))

    progress = xbmcgui.DialogProgress()
    progress.create(utils.translation(32020), " ", " ", " ")

    update = Updater()

    #get app updates
    while not progress.iscanceled():
        xbmc.sleep(100)
        update.update(service.update_app((hostname, username), app_id))
        if update.installed:
            break
        else:
            progress.update(update.percent, update.title1, "", "")

    progress.close() 
Example 4
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: pydevd_referrers.py    MIT License 6 votes vote down vote up
def print_var_node(xml_node, stream):
    name = xml_node.getAttribute('name')
    value = xml_node.getAttribute('value')
    val_type = xml_node.getAttribute('type')

    found_as = xml_node.getAttribute('found_as')
    stream.write('Name: ')
    stream.write(unquote_plus(name))
    stream.write(', Value: ')
    stream.write(unquote_plus(value))
    stream.write(', Type: ')
    stream.write(unquote_plus(val_type))
    if found_as:
        stream.write(', Found as: %s' % (unquote_plus(found_as),))
    stream.write('\n')


#===================================================================================================
# print_referrers
#=================================================================================================== 
Example 5
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: pycompletion.py    MIT License 6 votes vote down vote up
def GetImports(module_name):
    try:
        processor = pycompletionserver.Processor()
        data = urllib.unquote_plus(module_name)
        def_file, completions = _pydev_imports_tipper.GenerateTip(data)
        return processor.formatCompletionMessage(def_file, completions)
    except:
        s = StringIO.StringIO()
        exc_info = sys.exc_info()

        traceback.print_exception(exc_info[0], exc_info[1], exc_info[2], limit=None, file=s)
        err = s.getvalue()
        pycompletionserver.dbg('Received error: ' + str(err), pycompletionserver.ERROR)
        raise


#=======================================================================================================================
# main
#======================================================================================================================= 
Example 6
Project: Pancas   Author: Sup3Roque   File: googlephotos.py    GNU General Public License v2.0 6 votes vote down vote up
def resolve(url):
    try:
        result = client.request(url)
        result = result.replace('\r','').replace('\n','').replace('\t','')

        u = re.compile('"\d*/\d*x\d*.+?","(.+?)"').findall(result)[0]
        u = urllib.unquote_plus(u).decode('unicode-escape')
        u = re.compile('(http.+?)\s').findall(u)
        u = [re.sub(r'(=m\d*).+', r'\1', i) for i in u]
        u = sum([tag(i) for i in u], [])

        url = []
        try: url += [[i for i in u if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return 
Example 7
Project: Pancas   Author: Sup3Roque   File: googlephotos.py    GNU General Public License v2.0 6 votes vote down vote up
def resolve(url):
    try:
        result = client.request(url)
        result = result.replace('\r','').replace('\n','').replace('\t','')

        u = re.compile('"\d*/\d*x\d*.+?","(.+?)"').findall(result)[0]
        u = urllib.unquote_plus(u).decode('unicode-escape')
        u = re.compile('(http.+?)\s').findall(u)
        u = [re.sub(r'(=m\d*).+', r'\1', i) for i in u]
        u = sum([tag(i) for i in u], [])

        url = []
        try: url += [[i for i in u if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return 
Example 8
Project: Pancas   Author: Sup3Roque   File: icefilms_mv_tv_null.py    GNU General Public License v2.0 6 votes vote down vote up
def get_episode(self, url, imdb, tvdb, title, date, season, episode):
        try:
            if url == None: return

            result = ''
            links = [self.link_1]
            for base_link in links:
                result = client.request(urlparse.urljoin(base_link, url), headers=self.headers)
                if 'Donate' in str(result): break

            result = result.decode('iso-8859-1').encode('utf-8')
            result = urllib.unquote_plus(result)

            url = re.compile('(/ip[.]php.+?>%01dx%02d)' % (int(season), int(episode))).findall(result)[0]
            url = re.compile('(/ip[.]php.+?)&').findall(url)[-1]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')
            return url
        except:
            return 
Example 9
Project: TornadoWeb   Author: VxCoder   File: escape.py    Apache License 2.0 6 votes vote down vote up
def url_unescape(value, encoding='utf-8', plus=True):
        """Decodes the given value from a URL.

        The argument may be either a byte or unicode string.

        If encoding is None, the result will be a byte string.  Otherwise,
        the result is a unicode string in the specified encoding.

        If ``plus`` is true (the default), plus signs will be interpreted
        as spaces (literal plus signs must be represented as "%2B").  This
        is appropriate for query strings and form-encoded values but not
        for the path component of a URL.  Note that this default is the
        reverse of Python's urllib module.

        .. versionadded:: 3.1
           The ``plus`` argument
        """
        unquote = (urllib_parse.unquote_plus if plus else urllib_parse.unquote)
        if encoding is None:
            return unquote(utf8(value))
        else:
            return unicode_type(unquote(utf8(value)), encoding) 
Example 10
Project: sd-agent-core-plugins   Author: serverdensity   File: check.py    BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def _parse_uri(self, server, sanitize_username=False):
        """
        Parses a MongoDB-formatted URI (e.g. mongodb://user:[email protected]/db) and returns parsed elements
        and a sanitized URI.
        """
        parsed = pymongo.uri_parser.parse_uri(server)

        username = parsed.get('username')
        password = parsed.get('password')
        db_name = parsed.get('database')
        nodelist = parsed.get('nodelist')
        auth_source = parsed.get('options', {}).get('authsource')

        # Remove password (and optionally username) from sanitized server URI.
        # To ensure that the `replace` works well, we first need to url-decode the raw server string
        # since the password parsed by pymongo is url-decoded
        decoded_server = urllib.unquote_plus(server)
        clean_server_name = decoded_server.replace(password, "*" * 5) if password else decoded_server

        if sanitize_username and username:
            username_pattern = u"{}[@:]".format(re.escape(username))
            clean_server_name = re.sub(username_pattern, "", clean_server_name)

        return username, password, db_name, nodelist, clean_server_name, auth_source 
Example 11
Project: broom   Author: sebiwi   File: broom.py    MIT License 6 votes vote down vote up
def lambda_handler(event, context):
    bucket = event['Records'][0]['s3']['bucket']['name']
    key = urllib.unquote_plus(event['Records'][0]['s3']['object']['key'].encode('utf8'))
    try:
        s3_object = s3.get_object(Bucket=bucket, Key=key)
        s3_object_content = s3_object['Body'].read()
        s3_object_unzipped_content = decompress(s3_object_content)
        json_object = json.loads(s3_object_unzipped_content)
        for record in json_object['Records']:
            if record['eventName'] == "RunInstances":
                user = record['userIdentity']['userName']
                region = record['awsRegion']
                ec2 = boto3.resource('ec2', region_name=region)
                for index, instance in enumerate(record['responseElements']['instancesSet']['items']):
                    instance_object = ec2.Instance(instance['instanceId'])
                    tags = {}
                    for tag in instance_object.tags:
                        tags[tag['Key']] = tag['Value']
                    if('Code' not in tags or tags['Code'] not in CODES):
                        instance_object.terminate()
                        sns.publish(TopicArn=SNS_TOPIC_ARN, Message=report(instance, user, region))
    except Exception as e:
        print(e)
        raise e 
Example 12
Project: TESTGIT   Author: B-ROY   File: uri_parser.py    Apache License 2.0 6 votes vote down vote up
def parse_userinfo(userinfo):
    """Validates the format of user information in a MongoDB URI.
    Reserved characters like ':', '/', '+' and '@' must be escaped
    following RFC 2396.

    Returns a 2-tuple containing the unescaped username followed
    by the unescaped password.

    :Paramaters:
        - `userinfo`: A string of the form <username>:<password>

    .. versionchanged:: 2.2
       Now uses `urllib.unquote_plus` so `+` characters must be escaped.
    """
    if '@' in userinfo or userinfo.count(':') > 1:
        raise InvalidURI("':' or '@' characters in a username or password "
                         "must be escaped according to RFC 2396.")
    user, _, passwd = _partition(userinfo, ":")
    # No password is expected with GSSAPI authentication.
    if not user:
        raise InvalidURI("The empty string is not valid username.")
    user = unquote_plus(user)
    passwd = unquote_plus(passwd)

    return user, passwd 
Example 13
Project: dockerizeme   Author: dockerizeme   File: snippet.py    Apache License 2.0 6 votes vote down vote up
def busca(self,widget):
		if self.edit1.get_text() == '': return

		try:
			search = quote_plus(self.edit1.get_text())
			n = 0
			while True:
				url = 'http://ajax.googleapis.com/ajax/services/search/web?v=2.0&q=%s&start=%s' %(search,n)
				req = urllib2.Request(url)
				response = urllib2.urlopen(req).read()
				data = json.loads(response)
				for extract in (data['responseData']['results']):
					self.view.get_buffer().insert_at_cursor('%s\n'%unquote_plus(extract['url']))
					while events_pending():
						main_iteration()

				n += 4
		except:
			self.view.get_buffer().insert_at_cursor('\n100% Complete !!!\n') 
Example 14
Project: smsweb   Author: awangga   File: uri_parser.py    GNU Affero General Public License v3.0 6 votes vote down vote up
def parse_userinfo(userinfo):
    """Validates the format of user information in a MongoDB URI.
    Reserved characters like ':', '/', '+' and '@' must be escaped
    following RFC 2396.

    Returns a 2-tuple containing the unescaped username followed
    by the unescaped password.

    :Paramaters:
        - `userinfo`: A string of the form <username>:<password>

    .. versionchanged:: 2.2
       Now uses `urllib.unquote_plus` so `+` characters must be escaped.
    """
    if '@' in userinfo or userinfo.count(':') > 1:
        raise InvalidURI("':' or '@' characters in a username or password "
                         "must be escaped according to RFC 2396.")
    user, _, passwd = _partition(userinfo, ":")
    # No password is expected with GSSAPI authentication.
    if not user:
        raise InvalidURI("The empty string is not valid username.")
    user = unquote_plus(user)
    passwd = unquote_plus(passwd)

    return user, passwd 
Example 15
Project: ironpython2   Author: IronLanguages   File: test_urllib.py    Apache License 2.0 6 votes vote down vote up
def test_unquoting(self):
        # Make sure unquoting of all ASCII values works
        escape_list = []
        for num in range(128):
            given = hexescape(chr(num))
            expect = chr(num)
            result = urllib.unquote(given)
            self.assertEqual(expect, result,
                             "using unquote(): %s != %s" % (expect, result))
            result = urllib.unquote_plus(given)
            self.assertEqual(expect, result,
                             "using unquote_plus(): %s != %s" %
                             (expect, result))
            escape_list.append(given)
        escape_string = ''.join(escape_list)
        del escape_list
        result = urllib.unquote(escape_string)
        self.assertEqual(result.count('%'), 1,
                         "using quote(): not all characters escaped; %s" %
                         result)
        result = urllib.unquote(escape_string)
        self.assertEqual(result.count('%'), 1,
                         "using unquote(): not all characters escaped: "
                         "%s" % result) 
Example 16
Project: banruo   Author: yingshang   File: escape.py    GNU Lesser General Public License v3.0 6 votes vote down vote up
def url_unescape(value, encoding='utf-8', plus=True):
        """Decodes the given value from a URL.

        The argument may be either a byte or unicode string.

        If encoding is None, the result will be a byte string.  Otherwise,
        the result is a unicode string in the specified encoding.

        If ``plus`` is true (the default), plus signs will be interpreted
        as spaces (literal plus signs must be represented as "%2B").  This
        is appropriate for query strings and form-encoded values but not
        for the path component of a URL.  Note that this default is the
        reverse of Python's urllib module.

        .. versionadded:: 3.1
           The ``plus`` argument
        """
        unquote = (urllib_parse.unquote_plus if plus else urllib_parse.unquote)
        if encoding is None:
            return unquote(utf8(value))
        else:
            return unicode_type(unquote(utf8(value)), encoding) 
Example 17
Project: kay-template   Author: yosukesuzuki   File: views.py    MIT License 6 votes vote down vote up
def post_session(request):
  if request.method == "GET":
    from models import TemporarySession
    temporary_session = TemporarySession.get_by_key_name(
      request.values.get("session_id"))
    if temporary_session is not None:
      temporary_session.delete()
      import datetime
      allowed_datetime = datetime.datetime.now() - \
          datetime.timedelta(seconds=10)
      if temporary_session.created > allowed_datetime:
        from kay.sessions import renew_session
        renew_session(request)
        request.session['_user'] = temporary_session.user.key()
        return redirect(unquote_plus(request.values.get('next')))
  return Response("Error") 
Example 18
Project: code-inspector   Author: maxim5   File: 857cb7db10f2bd3f2a5000f5956e8b53_torr2xbmc.py    Apache License 2.0 6 votes vote down vote up
def get_params(paramstring):
    param=[]
    if len(paramstring)>=2:
        params=paramstring
        cleanedparams=params.replace('?','')
        if (params[len(params)-1]=='/'):
            params=params[0:len(params)-2]
        pairsofparams=cleanedparams.split('&')
        param={}
        for i in range(len(pairsofparams)):
            splitparams={}
            splitparams=pairsofparams[i].split('=')
            if (len(splitparams))==2:
                param[splitparams[0]]=splitparams[1]
    if len(param) > 0:
        for cur in param:
            param[cur] = urllib.unquote_plus(param[cur])
    return param 
Example 19
Project: pyblish-win   Author: pyblish   File: test_urllib.py    GNU Lesser General Public License v3.0 5 votes vote down vote up
def test_unquoting_parts(self):
        # Make sure unquoting works when have non-quoted characters
        # interspersed
        given = 'ab%sd' % hexescape('c')
        expect = "abcd"
        result = urllib.unquote(given)
        self.assertEqual(expect, result,
                         "using quote(): %s != %s" % (expect, result))
        result = urllib.unquote_plus(given)
        self.assertEqual(expect, result,
                         "using unquote_plus(): %s != %s" % (expect, result)) 
Example 20
Project: pyblish-win   Author: pyblish   File: test_urllib.py    GNU Lesser General Public License v3.0 5 votes vote down vote up
def test_unquoting_plus(self):
        # Test difference between unquote() and unquote_plus()
        given = "are+there+spaces..."
        expect = given
        result = urllib.unquote(given)
        self.assertEqual(expect, result,
                         "using unquote(): %s != %s" % (expect, result))
        expect = given.replace('+', ' ')
        result = urllib.unquote_plus(given)
        self.assertEqual(expect, result,
                         "using unquote_plus(): %s != %s" % (expect, result)) 
Example 21
Project: plugin.program.steam.streaming   Author: Drakulix   File: listAchievements.py    MIT License 5 votes vote down vote up
def listAchievements(params):
    appid = int(params.get('appid'))
    hostname = urllib.unquote_plus(params.get('hostname'))
    username = urllib.unquote_plus(params.get('username'))

    web_key = xbmcaddon.Addon().getSetting("steam_api_key")
    steamapi.core.APIConnection(api_key=web_key)

    steam_achievements = None
    with Service() as service:
        userid = service.get_steamid((hostname, username))
        try:
            steam_achievements = steamapi.user.SteamApp(appid, owner=int(userid)).achievements
        except:
            xbmcgui.Dialog().ok("Error Timeout", "")
            return

    achievements = []
    for achievement in steam_achievements:
        serialized_achievement = dict()
        serialized_achievement["name"] = achievement.name
        serialized_achievement["description"] = achievement.description
        serialized_achievement["is_unlocked"] = achievement.is_unlocked
        serialized_achievement["is_hidden"] = achievement.is_hidden
        serialized_achievement["icon"] = achievement.icon
        serialized_achievement["icon_gray"] = achievement.icon_gray
        achievements.append(serialized_achievement)

    for achievement in achievements:
        if not achievement["is_hidden"]:
            if achievement["is_unlocked"]:
                utils.addAchievement(achievement["name"], achievement["description"], achievement["is_unlocked"], hostname, username, achievement["icon"], "http://cdn.store.steampowered.com/fulldetailsheader/"+str(appid)+"/header.jpg")
            else:
                utils.addAchievement(achievement["name"], achievement["description"], achievement["is_unlocked"], hostname, username, achievement["icon_gray"], "http://cdn.store.steampowered.com/fulldetailsheader/"+str(appid)+"/header.jpg")

    xbmcplugin.endOfDirectory(pluginhandle, cacheToDisc=False) 
Example 22
Project: plugin.program.steam.streaming   Author: Drakulix   File: launchGame.py    MIT License 5 votes vote down vote up
def launchGame(params):
    app_id = int(params.get('id'))
    username = urllib.unquote_plus(params.get('username'))
    hostname = urllib.unquote_plus(params.get('hostname'))

    with Service() as service:
        app = service.update_app((hostname, username), app_id)
        if app["state"] == 4 or app["state"] == 8 or app["state"] == 16 or app["state"] == 64 or app["state"] == 8196:
            result = service.start_game((hostname, username), app_id)
            if result[0] != eresult.k_EResultOK:
                dialog = xbmcgui.Dialog()
                ok = dialog.ok(utils.translation(32012), utils.translation(32013) + "(Code: "+str(result[0])+")." + utils.translation(32014))
            else:
                player = xbmc.Player()
                if player.isPlaying():
                    player.pause()
                dialog = xbmcgui.DialogProgress()
                dialog.create(utils.translation(32043))
                service.launch_client(result[1], result[2], result[3], app_id, (hostname, username))
                dialog.close()
        elif app["state"] == -1 or app["state"] == 1:
            if xbmcgui.Dialog().yesno(utils.translation(32015), utils.translation(32016)):
                result = service.start_game((hostname, username), app_id)
                if result[0] == -1: #steam seems to use only positiv values, this is a little hacky. (TODO we should refactor this result to a dictionary)
                    dialog = xbmcgui.Dialog()
                    ok = dialog.ok(utils.translation(32012), utils.translation(32017))
                elif result[0] == 3: #no idea, how that number comes for that case
                    dialog = xbmcgui.Dialog()
                    ok = dialog.ok(utils.translation(32018), utils.translation(32019))
                else:
                    if result[0] != eresult.k_EResultBusy:
                        print "Unknown Result: "+str(result[0]) #TODO find a way to collect those (is informing the user to aggresive?)
                    status.status(service, params)

        else:
            print "Interesting state: "+str(app["state"]) #TODO find a way to collect those (is informing the user to aggresive?)
            status.status(service, params) 
Example 23
Project: face_rekognition   Author: cnidus   File: first_function.py    GNU General Public License v3.0 5 votes vote down vote up
def lambda_handler(event, context):

    print("Received event")
    print(json.dumps(event))

    # Retrieve the key for the uploaded S3 object that caused this function
    # to be triggered
    key = urllib.unquote_plus(event['Records'][0]['s3']['object']['key'].encode('utf8'))
    filename = key.split('/')[-1]

    try:
        # Elastic Transcoder prepends 'elastictranscoder/[filename]/[timestamp]-'
        # to the names of all files that the job creates
        timestamp = datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S')

        client = boto3.client('elastictranscoder')
        response = client.create_job(
            PipelineId=os.environ['PipelineId'],
            Input={'Key': key},
            OutputKeyPrefix='elastictranscoder/{}/{}_'.format(filename, timestamp),
            Output={
                'Key': 'transcoded-video.mp4',
                'ThumbnailPattern': 'thumbnail-{count}',
                'PresetId': os.environ['PresetId']
            }
        )

        print('New Elastic Transcoder job created: {}'.format(response['Job']['Id']))

    except Exception as e:
        print('Unable to create a new Elastic Transcoder job')
        print(e)
        raise(e) 
Example 24
Project: AshsSDK   Author: thehappydinoa   File: compat.py    MIT License 5 votes vote down vote up
def unquote_str(value, encoding='utf-8'):
        # In python2, unquote() gives us a string back that has the urldecoded
        # bits, but not the unicode parts.  We need to decode this manually.
        # unquote has special logic in which if it receives a unicode object it
        # will decode it to latin1.  This is hard coded.  To avoid this, we'll
        # encode the string with the passed in encoding before trying to
        # unquote it.
        byte_string = value.encode(encoding)
        return unquote_plus(byte_string).decode(encoding) 
Example 25
Project: repository.BludhavenGrayson   Author: BludhavenGrayson   File: plugintools.py    GNU General Public License v2.0 5 votes vote down vote up
def get_params():
    _log("get_params")
    
    param_string = sys.argv[2]
    
    _log("get_params "+str(param_string))
    
    commands = {}

    if param_string:
        split_commands = param_string[param_string.find('?') + 1:].split('&')
    
        for command in split_commands:
            _log("get_params command="+str(command))
            if len(command) > 0:
                if "=" in command:
                    split_command = command.split('=')
                    key = split_command[0]
                    value = urllib.unquote_plus(split_command[1])
                    commands[key] = value
                else:
                    commands[command] = ""
    
    _log("get_params "+repr(commands))
    return commands

# Fetch text content from an URL 
Example 26
Project: repository.BludhavenGrayson   Author: BludhavenGrayson   File: plugintools.py    GNU General Public License v2.0 5 votes vote down vote up
def get_params():
    _log("get_params")
    
    param_string = sys.argv[2]
    
    _log("get_params "+str(param_string))
    
    commands = {}

    if param_string:
        split_commands = param_string[param_string.find('?') + 1:].split('&')
    
        for command in split_commands:
            _log("get_params command="+str(command))
            if len(command) > 0:
                if "=" in command:
                    split_command = command.split('=')
                    key = split_command[0]
                    value = urllib.unquote_plus(split_command[1])
                    commands[key] = value
                else:
                    commands[command] = ""
    
    _log("get_params "+repr(commands))
    return commands

# Fetch text content from an URL 
Example 27
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: pydevd_comm.py    MIT License 5 votes vote down vote up
def __init__(self, seq, thread_id, frame_id, scope, attrs, style, encoded_code_or_file, fnname):
        self.sequence = seq
        self.thread_id = thread_id
        self.frame_id = frame_id
        self.scope = scope
        self.attrs = attrs
        self.style = style
        self.code_or_file = unquote_plus(encoded_code_or_file)
        self.fnname = fnname 
Example 28
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: debugger_unittest.py    MIT License 5 votes vote down vote up
def get_next_message(self, context_message, timeout=None):
        if timeout is None:
            timeout = self.MESSAGES_TIMEOUT
        try:
            msg = self._queue.get(block=True, timeout=timeout)
        except:
            raise TimeoutError('No message was written in %s seconds. Error message:\n%s' % (timeout, context_message,))
        else:
            frame = sys._getframe().f_back.f_back
            frame_info = ''
            while frame:
                if not frame.f_code.co_name.startswith('test_'):
                    frame = frame.f_back
                    continue

                if frame.f_code.co_filename.endswith('debugger_unittest.py'):
                    frame = frame.f_back
                    continue

                stack_msg = ' --  File "%s", line %s, in %s\n' % (frame.f_code.co_filename, frame.f_lineno, frame.f_code.co_name)
                if 'run' == frame.f_code.co_name:
                    frame_info = stack_msg  # Ok, found the writer thread 'run' method (show only that).
                    break
                frame_info += stack_msg
                frame = frame.f_back
                # Just print the first which is not debugger_unittest.py
                break

            frame = None
            sys.stdout.write('Message returned in get_next_message(): %s --  ctx: %s, asked at:\n%s\n' % (unquote_plus(unquote_plus(msg)), context_message, frame_info))

        if not self.accept_xml_messages:
            if '<xml' in msg:
                raise AssertionError('Xml messages disabled. Received: %s' % (msg,))
        return msg 
Example 29
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: debugger_unittest.py    MIT License 5 votes vote down vote up
def _is_var_in_last(self, expected, last):
        if expected in last:
            return True

        last = unquote_plus(last)
        if expected in last:
            return True

        # We actually quote 2 times on the backend...
        last = unquote_plus(last)
        if expected in last:
            return True

        return False 
Example 30
Project: vscode-mayapy   Author: FXTD-ODYSSEY   File: debugger_unittest.py    MIT License 5 votes vote down vote up
def wait_for_message(self, accept_message, unquote_msg=True, expect_xml=True, timeout=None):
        if isinstance(accept_message, (str, int)):
            msg_starts_with = '%s\t' % (accept_message,)

            def accept_message(msg):
                return msg.startswith(msg_starts_with)

        import untangle
        from io import StringIO
        prev = None
        while True:
            last = self.get_next_message('wait_for_message', timeout=timeout)
            if unquote_msg:
                last = unquote_plus(unquote_plus(last))
            if accept_message(last):
                if expect_xml:
                    # Extract xml and return untangled.
                    try:
                        xml = last[last.index('<xml>'):]
                        if isinstance(xml, bytes):
                            xml = xml.decode('utf-8')
                        xml = untangle.parse(StringIO(xml))
                    except:
                        traceback.print_exc()
                        raise AssertionError('Unable to parse:\n%s\nxml:\n%s' % (last, xml))
                    ret = xml.xml
                    ret.original_xml = last
                    return ret
                else:
                    return last
            if prev != last:
                print('Ignored message: %r' % (last,))

            prev = last 
Example 31
Project: Pancas   Author: Sup3Roque   File: plugintools.py    GNU General Public License v2.0 5 votes vote down vote up
def get_params(): # Parse XBMC params - based on script.module.parsedom addon    
    _log("get_params"); param_string=sys.argv[2]; _log("get_params "+str(param_string)); commands={}
    if param_string:
        split_commands=param_string[param_string.find('?') + 1:].split('&')
        for command in split_commands:
            _log("get_params command="+str(command))
            if len(command) > 0:
                if "=" in command: split_command=command.split('='); key=split_command[0]; value=urllib.unquote_plus(split_command[1]); commands[key]=value
                else: commands[command]=""
    _log("get_params "+repr(commands))
    return commands
# Fetch text content from an URL 
Example 32
Project: Pancas   Author: Sup3Roque   File: genesisresolvers.py    GNU General Public License v2.0 5 votes vote down vote up
def worker(self, data):
        try:
            data = str(data).replace('\r','').replace('\n','').replace('\t','')

            url = re.compile('(.+?)<regex>').findall(data)[0]
            regex = re.compile('<regex>(.+?)</regex>').findall(data)
        except:
            return

        for x in regex:
            try:
                name = re.compile('<name>(.+?)</name>').findall(x)[0]

                expres = re.compile('<expres>(.+?)</expres>').findall(x)[0]

                referer = re.compile('<referer>(.+?)</referer>').findall(x)[0]
                referer = urllib.unquote_plus(referer)
                referer = common.replaceHTMLCodes(referer)
                referer = referer.encode('utf-8')

                page = re.compile('<page>(.+?)</page>').findall(x)[0]
                page = urllib.unquote_plus(page)
                page = common.replaceHTMLCodes(page)
                page = page.encode('utf-8')

                result = getUrl(page, referer=referer).result
                result = str(result).replace('\r','').replace('\n','').replace('\t','')
                result = str(result).replace('\/','/')

                r = re.compile(expres).findall(result)[0]
                url = url.replace('$doregex[%s]' % name, r)
            except:
                pass

        url = common.replaceHTMLCodes(url)
        url = url.encode('utf-8')
        return url 
Example 33
Project: Pancas   Author: Sup3Roque   File: sawlive.py    GNU General Public License v2.0 5 votes vote down vote up
def resolve(url):
    try:
        page = re.compile('//.+?/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        page = 'http://sawlive.tv/embed/%s' % page

        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page

        result = client.request(page, referer=referer)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: pass
        result += unpacked
        result = urllib.unquote_plus(result)

        result = re.compile('<iframe(.+?)</iframe>').findall(result)[-1]

        url = re.compile('src\s*=\s*[\'|\"](.+?)[\'|\"].+?[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = '/'.join(url)

        result = client.request(url, referer=referer)

        strm = re.compile("'streamer'.+?'(.+?)'").findall(result)[0]
        file = re.compile("'file'.+?'(.+?)'").findall(result)[0]
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=30' % (strm, file, swf, url)
        return url
    except:
        return 
Example 34
Project: Pancas   Author: Sup3Roque   File: afdah_mv.py    GNU General Public License v2.0 5 votes vote down vote up
def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None: return sources

            self.base_link = random.choice([self.base_link_1, self.base_link_2])

            url = urlparse.urljoin(self.base_link, url)

            result = client.source(url)

            video_id = re.compile('video_id *= *[\'|\"](.+?)[\'|\"]').findall(result)[0]
            post = {'video_id': video_id}

            result = client.source(urlparse.urljoin(self.base_link, self.info_link), post=post)

            u = [i for i in result.split('&') if 'google' in i][0]
            u = urllib.unquote_plus(u)
            u = [urllib.unquote_plus(i.split('|')[-1]) for i in u.split(',')]
            u = [googleplus.tag(i)[0] for i in u]
            u = [i for i in u if i['quality'] in ['1080p', 'HD']]

            for i in u: sources.append({'source': 'GVideo', 'quality': i['quality'], 'provider': 'Afdah', 'url': i['url']})

            return sources
        except:
            return sources 
Example 35
Project: Pancas   Author: Sup3Roque   File: genesisresolvers.py    GNU General Public License v2.0 5 votes vote down vote up
def worker(self, data):
        try:
            data = str(data).replace('\r','').replace('\n','').replace('\t','')

            url = re.compile('(.+?)<regex>').findall(data)[0]
            regex = re.compile('<regex>(.+?)</regex>').findall(data)
        except:
            return

        for x in regex:
            try:
                name = re.compile('<name>(.+?)</name>').findall(x)[0]

                expres = re.compile('<expres>(.+?)</expres>').findall(x)[0]

                referer = re.compile('<referer>(.+?)</referer>').findall(x)[0]
                referer = urllib.unquote_plus(referer)
                referer = common.replaceHTMLCodes(referer)
                referer = referer.encode('utf-8')

                page = re.compile('<page>(.+?)</page>').findall(x)[0]
                page = urllib.unquote_plus(page)
                page = common.replaceHTMLCodes(page)
                page = page.encode('utf-8')

                result = getUrl(page, referer=referer).result
                result = str(result).replace('\r','').replace('\n','').replace('\t','')
                result = str(result).replace('\/','/')

                r = re.compile(expres).findall(result)[0]
                url = url.replace('$doregex[%s]' % name, r)
            except:
                pass

        url = common.replaceHTMLCodes(url)
        url = url.encode('utf-8')
        return url 
Example 36
Project: Pancas   Author: Sup3Roque   File: sawlive.py    GNU General Public License v2.0 5 votes vote down vote up
def resolve(url):
    try:
        page = re.compile('//.+?/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        page = 'http://sawlive.tv/embed/%s' % page

        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page

        result = client.request(page, referer=referer)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: pass
        result += unpacked
        result = urllib.unquote_plus(result)

        result = re.compile('<iframe(.+?)</iframe>').findall(result)[-1]

        url = re.compile('src\s*=\s*[\'|\"](.+?)[\'|\"].+?[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = '/'.join(url)

        result = client.request(url, referer=referer)

        strm = re.compile("'streamer'.+?'(.+?)'").findall(result)[0]
        file = re.compile("'file'.+?'(.+?)'").findall(result)[0]
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=30' % (strm, file, swf, url)
        return url
    except:
        return 
Example 37
Project: Pancas   Author: Sup3Roque   File: afdah_mv.py    GNU General Public License v2.0 5 votes vote down vote up
def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None: return sources

            self.base_link = random.choice([self.base_link_1, self.base_link_2])

            url = urlparse.urljoin(self.base_link, url)

            result = client.source(url)

            video_id = re.compile('video_id *= *[\'|\"](.+?)[\'|\"]').findall(result)[0]
            post = {'video_id': video_id}

            result = client.source(urlparse.urljoin(self.base_link, self.info_link), post=post)

            u = [i for i in result.split('&') if 'google' in i][0]
            u = urllib.unquote_plus(u)
            u = [urllib.unquote_plus(i.split('|')[-1]) for i in u.split(',')]
            u = [googleplus.tag(i)[0] for i in u]
            u = [i for i in u if i['quality'] in ['1080p', 'HD']]

            for i in u: sources.append({'source': 'GVideo', 'quality': i['quality'], 'provider': 'Afdah', 'url': i['url']})

            return sources
        except:
            return sources 
Example 38
Project: TornadoWeb   Author: VxCoder   File: escape.py    Apache License 2.0 5 votes vote down vote up
def url_unescape(value, encoding='utf-8', plus=True):
        """Decodes the given value from a URL.

        The argument may be either a byte or unicode string.

        If encoding is None, the result will be a byte string.  Otherwise,
        the result is a unicode string in the specified encoding.

        If ``plus`` is true (the default), plus signs will be interpreted
        as spaces (literal plus signs must be represented as "%2B").  This
        is appropriate for query strings and form-encoded values but not
        for the path component of a URL.  Note that this default is the
        reverse of Python's urllib module.

        .. versionadded:: 3.1
           The ``plus`` argument
        """
        if encoding is None:
            if plus:
                # unquote_to_bytes doesn't have a _plus variant
                value = to_basestring(value).replace('+', ' ')
            return urllib_parse.unquote_to_bytes(value)
        else:
            unquote = (urllib_parse.unquote_plus if plus
                       else urllib_parse.unquote)
            return unquote(to_basestring(value), encoding=encoding) 
Example 39
Project: Health-Checker   Author: KriAga   File: clean.py    MIT License 5 votes vote down vote up
def _remove_javascript_link(self, link):
        # links like "j a v a s c r i p t:" might be interpreted in IE
        new = _substitute_whitespace('', unquote_plus(link))
        if _is_javascript_scheme(new):
            # FIXME: should this be None to delete?
            return ''
        return link 
Example 40
Project: octopuscloud   Author: christianbaun   File: utils.py    Apache License 2.0 5 votes vote down vote up
def get_aws_metadata(headers, provider=None):
    if not provider:
        provider = boto.provider.get_default()
    metadata_prefix = provider.metadata_prefix
    metadata = {}
    for hkey in headers.keys():
        if hkey.lower().startswith(metadata_prefix):
            val = urllib.unquote_plus(headers[hkey])
            metadata[hkey[len(metadata_prefix):]] = unicode(val, 'utf-8')
            del headers[hkey]
    return metadata 
Example 41
Project: obscmdbench   Author: huaweicloud-obs   File: run.py    Apache License 2.0 5 votes vote down vote up
def list_objects_in_bucket(process_id, user, conn, result_queue):
    request_type = 'ListObjectsInBucket'
    rest = obsPyCmd.OBSRequestDescriptor(request_type, ak=user.ak, sk=user.sk,
                                         auth_algorithm=CONFIG['AuthAlgorithm'], virtual_host=CONFIG['VirtualHost'],
                                         domain_name=CONFIG['DomainName'], region=CONFIG['Region'],
                                         is_http2=CONFIG['IsHTTP2'], host=conn.host)
    rest.queryArgs['max-keys'] = CONFIG['Max-keys']
    if CONFIG.__contains__('prefix') and CONFIG['prefix']:
        rest.queryArgs['prefix'] = CONFIG['prefix']
    i = 0
    if CONFIG['BucketNameFixed']:
        rest.bucket = CONFIG['BucketNameFixed']
    if CONFIG['TpsPerThread']:
        start_time = time.time()  # 开始时间
    total_requests = 0
    while i < CONFIG['BucketsPerUser']:
        if not CONFIG['BucketNameFixed']:
            rest.bucket = '%s.%s.%d' % (user.ak.lower(), CONFIG['BucketNamePrefix'], i)
        i += 1
        marker = ''
        while marker is not None:
            if CONFIG['TpsPerThread']:  # 限制tps
                # 按限制的tps数计算当前应该到的时间。计算方法: 当前已完成的请求 / 限制TPS + 并发开始时间
                dst_time = total_requests * 1.0 / CONFIG['TpsPerThread'] + start_time
                wait_time = dst_time - time.time()
                if wait_time > 0:
                    time.sleep(wait_time)
            total_requests += 1
            rest.queryArgs['marker'] = urllib.unquote_plus(marker)
            resp = obsPyCmd.OBSRequestHandler(rest, conn).make_request()
            marker = resp.return_data
            result_queue.put(
                (process_id, user.username, rest.recordUrl, request_type, resp.start_time,
                 resp.end_time, resp.send_bytes, resp.recv_bytes, '', resp.request_id, resp.status, resp.id2)) 
Example 42
Project: Akeso   Author: ameserole   File: auth.py    MIT License 5 votes vote down vote up
def confirm_user(data=None):
    if not utils.get_config('verify_emails'):
        return redirect(url_for('challenges.challenges_view'))
    if data and request.method == "GET": # User is confirming email account
        try:
            s = Signer(app.config['SECRET_KEY'])
            email = s.unsign(urllib.unquote_plus(data.decode('base64')))
        except BadSignature:
            return render_template('confirm.html', errors=['Your confirmation link seems wrong'])
        except:
            return render_template('confirm.html', errors=['Your link appears broken, please try again.'])
        team = Teams.query.filter_by(email=email).first_or_404()
        team.verified = True
        db.session.commit()
        logger = logging.getLogger('regs')
        logger.warn("[{0}] {1} confirmed {2}".format(time.strftime("%m/%d/%Y %X"), team.name.encode('utf-8'), team.email.encode('utf-8')))
        db.session.close()
        if utils.authed():
            return redirect(url_for('challenges.challenges_view'))
        return redirect(url_for('auth.login'))
    if not data and request.method == "GET": # User has been directed to the confirm page because his account is not verified
        if not utils.authed():
            return redirect(url_for('auth.login'))
        team = Teams.query.filter_by(id=session['id']).first_or_404()
        if team.verified:
            return redirect(url_for('views.profile'))
        else:
            utils.verify_email(team.email)
        return render_template('confirm.html', team=team) 
Example 43
Project: Akeso   Author: ameserole   File: auth.py    MIT License 5 votes vote down vote up
def reset_password(data=None):
    if data is not None and request.method == "GET":
        return render_template('reset_password.html', mode='set')
    if data is not None and request.method == "POST":
        try:
            s = TimedSerializer(app.config['SECRET_KEY'])
            name = s.loads(urllib.unquote_plus(data.decode('base64')), max_age=1800)
        except BadTimeSignature:
            return render_template('reset_password.html', errors=['Your link has expired'])
        except:
            return render_template('reset_password.html', errors=['Your link appears broken, please try again.'])
        team = Teams.query.filter_by(name=name).first_or_404()
        team.password = bcrypt_sha256.encrypt(request.form['password'].strip())
        db.session.commit()
        db.session.close()
        return redirect(url_for('auth.login'))

    if request.method == 'POST':
        email = request.form['email'].strip()
        team = Teams.query.filter_by(email=email).first()
        if not team:
            return render_template('reset_password.html', errors=['If that account exists you will receive an email, please check your inbox'])
        s = TimedSerializer(app.config['SECRET_KEY'])
        token = s.dumps(team.name)
        text = """
Did you initiate a password reset?

{0}/{1}

""".format(url_for('auth.reset_password', _external=True), urllib.quote_plus(token.encode('base64')))

        utils.sendmail(email, text)

        return render_template('reset_password.html', errors=['If that account exists you will receive an email, please check your inbox'])
    return render_template('reset_password.html') 
Example 44
Project: aws-cfn-plex   Author: lordmuffin   File: compat.py    MIT License 5 votes vote down vote up
def unquote_str(value, encoding='utf-8'):
        # In python2, unquote() gives us a string back that has the urldecoded
        # bits, but not the unicode parts.  We need to decode this manually.
        # unquote has special logic in which if it receives a unicode object it
        # will decode it to latin1.  This is hard coded.  To avoid this, we'll
        # encode the string with the passed in encoding before trying to
        # unquote it.
        byte_string = value.encode(encoding)
        return unquote_plus(byte_string).decode(encoding) 
Example 45
Project: Instagram-API   Author: danleyb2   File: Checkpoint.py    MIT License 5 votes vote down vote up
def request(self, endpoint, headers=None, post=None, first=True):
        buffer = BytesIO()

        ch = pycurl.Curl()

        ch.setopt(pycurl.URL, endpoint)
        ch.setopt(pycurl.USERAGENT, self.userAgent)
        ch.setopt(pycurl.WRITEFUNCTION, buffer.write)
        ch.setopt(pycurl.FOLLOWLOCATION, True)
        ch.setopt(pycurl.HEADER, True)
        if headers:
            ch.setopt(pycurl.HTTPHEADER, headers)

        ch.setopt(pycurl.VERBOSE, self.debug)
        ch.setopt(pycurl.SSL_VERIFYPEER, False)
        ch.setopt(pycurl.SSL_VERIFYHOST, False)
        ch.setopt(pycurl.COOKIEFILE, self.settingsPath + self.username + '-cookies.dat')
        ch.setopt(pycurl.COOKIEJAR, self.settingsPath + self.username + '-cookies.dat')

        if post:
            import urllib
            ch.setopt(pycurl.POST, len(post))
            ch.setopt(pycurl.POSTFIELDS, urllib.urlencode(post))

        ch.perform()
        resp = buffer.getvalue()
        header_len = ch.getinfo(pycurl.HEADER_SIZE)
        header = resp[0: header_len]
        body = resp[header_len:]
        ch.close()

        if self.debug:
            import urllib
            print("REQUEST: " + endpoint)
            if post is not None:
                if not isinstance(post, list):
                    print('DATA: ' + urllib.unquote_plus(json.dumps(post)))
            print("RESPONSE: " + body + "\n")

        return [header, json_decode(body)] 
Example 46
Project: grand_central   Author: amiracle   File: compat.py    MIT License 5 votes vote down vote up
def unquote_str(value, encoding='utf-8'):
        # In python2, unquote() gives us a string back that has the urldecoded
        # bits, but not the unicode parts.  We need to decode this manually.
        # unquote has special logic in which if it receives a unicode object it
        # will decode it to latin1.  This is hard coded.  To avoid this, we'll
        # encode the string with the passed in encoding before trying to
        # unquote it.
        byte_string = value.encode(encoding)
        return unquote_plus(byte_string).decode(encoding) 
Example 47
Project: TESTGIT   Author: B-ROY   File: escape.py    Apache License 2.0 5 votes vote down vote up
def url_unescape(value, encoding='utf-8'):
        """Decodes the given value from a URL.

        The argument may be either a byte or unicode string.

        If encoding is None, the result will be a byte string.  Otherwise,
        the result is a unicode string in the specified encoding.
        """
        if encoding is None:
            return urllib.unquote_plus(utf8(value))
        else:
            return unicode(urllib.unquote_plus(utf8(value)), encoding) 
Example 48
Project: TESTGIT   Author: B-ROY   File: escape.py    Apache License 2.0 5 votes vote down vote up
def url_unescape(value, encoding='utf-8'):
        """Decodes the given value from a URL.

        The argument may be either a byte or unicode string.

        If encoding is None, the result will be a byte string.  Otherwise,
        the result is a unicode string in the specified encoding.
        """
        if encoding is None:
            return urllib.parse.unquote_to_bytes(value)
        else:
            return urllib.unquote_plus(to_basestring(value), encoding=encoding) 
Example 49
Project: transformer   Author: zapier   File: url_decode.py    GNU General Public License v3.0 5 votes vote down vote up
def transform(self, str_input, use_plus=False, **kwargs):
        if not str_input:
            return u''

        if use_plus:
            decoded_text = urllib.unquote_plus(str_input)
        else:
            decoded_text = urllib.unquote(str_input)

        return decoded_text 
Example 50
Project: bugatsinho.github.io   Author: bugatsinho   File: playerMP3.py    GNU General Public License v3.0 5 votes vote down vote up
def play(sys, params):
    log('Setting resolving property')
    xbmcgui.Window(10000).setProperty(RESOLVING, RESOLVING)

    title    = urllib.unquote_plus(params['title'])
    artist   = urllib.unquote_plus(params['artist'])
    album    = urllib.unquote_plus(params['album'])
    track    = urllib.unquote_plus(params['track'])
    image    = urllib.unquote_plus(params['image'])
    duration = urllib.unquote_plus(params['duration'])
    filename = urllib.unquote_plus(params['filename'])
    url      = urllib.unquote_plus(params['url'])

    log('**** In playFile ****')
    log(title)
    log(url)
    log(filename)

    playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC)
    posn     = playlist.getposition()
    next     = posn+1

    fetchFile(title, artist, album, track, url, filename)
    fetchNext(next)

    log('**** FILE %s NOW AVAILABLE ****' % filename)
    liz = xbmcgui.ListItem(title, iconImage=image, thumbnailImage=image, path=filename)

    liz.setInfo('music', {'Title':title, 'Artist':artist, 'Album':album, 'Duration':duration})
    liz.setProperty('mimetype', 'audio/mpeg')
    liz.setProperty('IsPlayable','true')

    xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)

    log('Clearing resolving property')
    xbmcgui.Window(10000).clearProperty(RESOLVING)


#------------------------------------------------------------------------