@Kash_Tan

Почему pytube выдает ошибку?

Ошибка
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

Почитал, ее выдавало в версии 11.0, но у меня 12.0 и все должно быть норм вроде. Скачиваю видео
код
file = YouTube(url).streams.get_highest_resolution()
file.download(filename=file_name)
  • Вопрос задан
  • 129 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы