question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] RegexMatchError get_throttling_function_name: could not find match for multiple

See original GitHub issue

Hello, I have problem with streams of YouTube wideo. I have tried everything I found on the net! I will be grateful for help!

My code:

from pytube import YouTube
yt = YouTube("https://www.youtube.com/watch?v=JLXBvVh8-2A")
yt.streams

My fucking error:

Traceback (most recent call last):
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\__main__.py", line 181, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 43, in __init__
    self.throttling_plan = get_throttling_plan(js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 405, in get_throttling_plan
    raw_code = get_throttling_function_code(js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 311, in get_throttling_function_code
    name = re.escape(get_throttling_function_name(js))
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 296, 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 "<stdin>", line 1, in <module>
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\__main__.py", line 296, in streams
    return StreamQuery(self.fmt_streams)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\__main__.py", line 188, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 43, in __init__
    self.throttling_plan = get_throttling_plan(js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 405, in get_throttling_plan
    raw_code = get_throttling_function_code(js)
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 311, in get_throttling_function_code
    name = re.escape(get_throttling_function_name(js))
  File "C:\Users\kacpe\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\pytube\cipher.py", line 296, in get_throttling_function_name
    raise RegexMatchError(
pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:17
  • Comments:26

github_iconTop GitHub Comments

15reactions
EterneralAmbivalencecommented, Apr 20, 2022

This fix by eroc1234 resolved it for me.

As noted by gangmax in the responses to that post, function_patterns is defined on line 264 of cipher.py The actual expressions to modify are on lines 272~273

pytube 12.0.0 python 3.8 Windows 7

7reactions
derleymadcommented, Apr 19, 2022

same here

Read more comments on GitHub >

github_iconTop Results From Across the Web

get_throttling_function_name: could not find match for multiple ...
With this code update now downloading youtube video with pytube works!!! Update your pytube library with this command: python3 -m pip install -- ......
Read more >
pytube.exceptions.RegexMatchError ... - GitHub
pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple[BUG] #1105.
Read more >
get_throttling_function_name: could not find match for multiple
[A-Z]&&\(b=a\. get \("n"\)\)&&\(b=([^(]+)\(b\)',In this video, you will leran how to fix the error : pytube.exceptions. RegexMatchError : get_t.
Read more >
get_throttling_function_name: could not find match for multiple ...
RegexMatchError : get_throttling_function_name: could not find match for multiple pytube ; 1. try upgrading pytube like this: ; 2. pip install ...
Read more >
Regexmatcherror With Pytube - ADocLib
[BUG] pytube.exceptions.RegexMatchError: getthrottlingfunctionname: could not find match for multiple. I did this simple code for downloading videos:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found