JuanBindez / pytubefix

Python3 library for downloading YouTube Videos.
https://pytubefix.readthedocs.io
MIT License
722 stars 100 forks source link

RegexMatchError: get_throttling_function_name #276

Open Deslakator opened 1 month ago

Deslakator commented 1 month ago

:exclamation: DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE :exclamation:

lack of information will lead to closure of the issue


Describe the bug A clear and concise description of what the bug is. Exception while get stream

pytubefix.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js


code that was used that resulted in the bug

from pytubefix import YouTube

YouTube( 'https://www.youtube.com/watch?v=_BZIvjMgH-Q', client='MWEB').streams

Expected behavior A clear and concise description of what you expected to happen. Download stream


Screenshots If applicable, add screenshots to help explain your problem.


Desktop (please complete the following information):


Additional context Add any other context about the problem here.

Today morning everything was ok

jhanley-com commented 1 month ago

In pytubefix version 7.3.1, I can download the URL with no problems. Tested again with pytubefix 7.4.0 and again no problems.

My code is using the default client.

I can reproduce the problem if I changed the client to "MWEB"

Temporary solution - do not specify the client. this will give you working code while the bug is being investigated.

YouTube( 'https://www.youtube.com/watch?v=_BZIvjMgH-Q').streams

Deslakator commented 1 month ago

Thanks a lot, I switched to a default client. It works great

seto-kaiba-0 commented 1 month ago

@jhanley-com Hi, not working with po-token.

jhanley-com commented 1 month ago

@seto-kaiba-0 Can you clarify what you mean by "not working"? Minimal example code usually helps.

felipeucelli commented 1 month ago

The fix for this problem is available in this PR #277.

n8creator commented 1 month ago

Here is an output while switching different clients in a loop for your url https://www.youtube.com/watch?v=_BZIvjMgH-Q:

$ youtube -s https://www.youtube.com/watch?v=_BZIvjMgH-Q --hq

Trying to reach video with "WEB" client
Error occured while downloading via "WEB" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach video with "WEB_EMBED" client
Error occured while downloading via "WEB_EMBED" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach video with "WEB_MUSIC" client
Error occured while downloading via "WEB_MUSIC" client: _BZIvjMgH-Q is unavailable

Trying to reach video with "WEB_CREATOR" client
Error occured while downloading via "WEB_CREATOR" client: _BZIvjMgH-Q requires login to view, reason: Please sign in

Trying to reach video with "WEB_SAFARI" client
Error occured while downloading via "WEB_SAFARI" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach video with "ANDROID" client
Downloading "DevBytes ListView Cell Dragging and Rearranging" .mp4 video file in highest available resolution...
 ↳ |████████████████████████████████████████████████████████████████████████████████████████| 100.0%
.mp4 video file was successfully downloaded!

Trying to reach audio with "WEB" client
Error occured while downloading via "WEB" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach audio with "WEB_EMBED" client
Error occured while downloading via "WEB_EMBED" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach audio with "WEB_MUSIC" client
Error occured while downloading via "WEB_MUSIC" client: _BZIvjMgH-Q is unavailable

Trying to reach audio with "WEB_CREATOR" client
Error occured while downloading via "WEB_CREATOR" client: _BZIvjMgH-Q requires login to view, reason: Please sign in

Trying to reach audio with "WEB_SAFARI" client
Error occured while downloading via "WEB_SAFARI" client: get_throttling_function_name: could not find match for multiple in https://youtube.com/s/player/2f238d39/player_ias.vflset/en_US/base.js

Trying to reach audio with "ANDROID" client
Downloading "DevBytes ListView Cell Dragging and Rearranging" audio file in highest available bitrate...
 ↳ |███████████████████████████████████████████████████████████████████████████████████████████| 100.0%
Audio track successfully downloaded...
Audio and video files were merged...
Video was saved as "2013-08-23 - [Android Developers] - DevBytes ListView Cell Dragging***.mp4"!
File "audio.mp4" was deleted
File "video.mp4" was deleted
This video does not have any chapters!