Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegexMatchError: get_throttling_function_name #276

Open
Deslakator opened this issue Oct 10, 2024 · 6 comments
Open

RegexMatchError: get_throttling_function_name #276

Deslakator opened this issue Oct 10, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Deslakator
Copy link

❗ DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE ❗

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):

  • OS: [Ubuntu, MacOS]
  • Python Version [3.11.0,3.13.0]
  • Pytubefix Version [7.4.0]

Additional context
Add any other context about the problem here.

Today morning everything was ok

@Deslakator Deslakator added the bug Something isn't working label Oct 10, 2024
@jhanley-com
Copy link

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
Copy link
Author

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

@seto-kaiba-0
Copy link

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

@jhanley-com
Copy link

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

@felipeucelli
Copy link
Contributor

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

@n8creator
Copy link
Contributor

n8creator commented Oct 13, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: waiting
Development

No branches or pull requests

5 participants