Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

401
Visualizações
pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

I used to download songs the following way:

from pytube import YouTube
video = YouTube('https://www.youtube.com/watch?v=AWXvSBHB210')
video.streams.get_by_itag(251).download()

Since today there is this error:

Traceback (most recent call last): File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube_main_.py", line 170, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\extract.py", line 409, in apply_signature cipher = Cipher(js=js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 43, in init self.throttling_plan = get_throttling_plan(js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 387, in get_throttling_plan raw_code = get_throttling_function_code(js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 293, in get_throttling_function_code name = re.escape(get_throttling_function_name(js)) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 278, in get_throttling_function_name raise RegexMatchError( pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Me\Documents\YouTubeDownloader.py", line 3, in video.streams.get_by_itag(251).download() File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube_main_.py", line 285, in streams return StreamQuery(self.fmt_streams) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube_main_.py", line 177, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\extract.py", line 409, in apply_signature cipher = Cipher(js=js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 43, in init self.throttling_plan = get_throttling_plan(js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 387, in get_throttling_plan raw_code = get_throttling_function_code(js) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 293, in get_throttling_function_code name = re.escape(get_throttling_function_name(js)) File "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 278, in get_throttling_function_name raise RegexMatchError( pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I had same issue when i was using pytube 11.0.0

so found out that there is a regular expression filter mismatch in pytube library in cipher.py class

function_patterns = [

    r'a\.C&&\(b=a\.get\("n"\)\)&&\(b=([^(]+)\(b\),a\.set\("n",b\)\)}};',
]

Now there is a update of pytube code yesterday to 11.0.1

function_patterns = [

    r'a\.[A-Z]&&\(b=a\.get\("n"\)\)&&\(b=([^(]+)\(b\)',
]

With this code update now downloading youtube video with pytube works!!!

update your pytube library with this command

python3 -m pip install --upgrade pytube

over 4 years ago · Santiago Trujillo Relatório

0

Upgrade pytube

python3 -m pip install --upgrade pytube

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda