Criei uma classe pra converter porque achei que não se encaixava na do extrator.
import re
url = "bytebank.com/cambio?quantidade=100&moedaOrigem=dolar&moedaDestino=real"
class ExtratorURL:
    def __init__(self, url):
        self.url = self.sanitiza_url(url)
        self.valida_url()
    def __len__(self):
        return len(self.url)
    def __str__(self):
        return f" URL: {url}\n URL base: {self.get_url_base()}\n Parâmetros da URL: {self.get_url_parametros()}"
    def __eq__(self, other):
        return self.url == other.url
    def sanitiza_url(self, url):
        if type(url) == str:
            return url.strip()
        else:
            return ""
    def valida_url(self):
        if not self.url:
            raise ValueError("A URL está vazia")
        padrao_url = re.compile('(http(s)?://)?(www\.)?bytebank\.com(\.br)?/cambio')
        match = padrao_url.match(self.get_url_base())
        if not match:
            raise ValueError("A URL não é válida")
    def get_url_base(self):
        indice_interrogacao = self.url.find('?')
        url_base = self.url[:indice_interrogacao]
        return url_base
    def get_url_parametros(self):
        indice_interrogacao = self.url.find('?')
        url_parametros = self.url[indice_interrogacao + 1:]
        return url_parametros
    def get_valor_parametro(self, parametro_busca):
        indice_parametro = self.get_url_parametros().find(parametro_busca)
        indice_valor = indice_parametro + len(parametro_busca) + 1
        indice_e_comercial = self.get_url_parametros().find('&', indice_valor)
        if indice_e_comercial == -1:
            valor = self.get_url_parametros()[indice_valor:]
        else:
            valor = self.get_url_parametros()[indice_valor:indice_e_comercial]
        return valor
class Converte_moeda(ExtratorURL):
    def conversao(self):
        VALOR_DOLAR = 5.24
        moeda_destino = extrator_url.get_valor_parametro("moedaDestino")
        quantidade = extrator_url.get_valor_parametro("quantidade")
        if moeda_destino == 'real':
            moeda_destino = float(quantidade) * VALOR_DOLAR
            return f"O valor de US${quantidade} convertido em reais é: R${moeda_destino:.2f}"
        elif moeda_destino == 'dolar':
            moeda_destino = float(quantidade) / VALOR_DOLAR
            return f"O valor de R${quantidade} convertido em dolares é: US${moeda_destino:.2f}"
extrator_url = ExtratorURL(url)
valor_convertido = Converte_moeda(url)
print(valor_convertido.conversao())
print(f"Os parâmetros da Url são: \n{extrator_url}") 
            