def METHOD_NAME(self):
    if self.config.startswith(("http://", "https://")):
        # location is an URL, use it
        self.url = self.config.replace("http://", "https://")
    else:
        # interpret location as keywords
        self.url = SEARCH_URL % urllib.parse.quote(self.config)