K
K
Kash_Tan2022-04-15 22:52:25
YouTube
Kash_Tan, 2022-04-15 22:52:25

Why is pytube throwing an error?

Mistake
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\__main__.py", line 181, in fmt_streams
extract.apply_signature(stream_manifest, self.vid_info, self.js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\extract.py", line 409, in apply_signature
cipher = Cipher(js=js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 43, in __init__
self.throttling_plan = get_throttling_plan(js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 405, in get_throttling_plan
raw_code = get_throttling_function_code(js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 311, in get_throttling_function_code
name = re.escape(get_throttling_function_name(js))
File "D:\Programming\Python\Projects\final_project\venv\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 "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\telegram\ext\dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\telegram\ext\conversationhandler.py", line 626, in handle_update
new_state = handler.handle_update(update, dispatcher, check_result, context)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\telegram\ext\handler.py", line 198, in handle_update
return self.callback(update, context)
File "D:\Programming\Python\Projects\final_project\functions.py", line 169, in send_video
name = youtube_download(name_of_file, url)
File "D:\Programming\Python\Projects\final_project\functions.py", line 62, in youtube_download
file = YouTube(url).streams.get_highest_resolution()
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\__main__.py", line 296, in streams
return StreamQuery(self.fmt_streams)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\__main__.py", line 188, in fmt_streams
extract.apply_signature(stream_manifest, self.vid_info, self.js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\extract.py", line 409, in apply_signature
cipher = Cipher(js=js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 43, in __init__
self.throttling_plan = get_throttling_plan(js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 405, in get_throttling_plan
raw_code = get_throttling_function_code(js)
File "D:\Programming\Python\Projects\final_project\venv\lib\site-packages\pytube\cipher.py", line 311, in get_throttling_function_code
name = re.escape(get_throttling_function_name(js))
File "D:\Programming\Python\Projects\final_project\venv\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

I read it, it was issued in version 11.0, but I have 12.0 and everything should be like normal. downloading video
the code
file = YouTube(url).streams.get_highest_resolution()
file.download(filename=file_name)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question