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

VideoUnavailable #346

Open
compujan66 opened this issue Nov 21, 2024 · 1 comment
Open

VideoUnavailable #346

compujan66 opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@compujan66
Copy link

❗ DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE ❗

lack of information will lead to closure of the issue


Describe the bug
Getting an youtube video with an - in the url e.g. https://youtu.be/HYG12gV-xGE?feature=shared
will lead to a errormessage: pytubefix.exceptions.VideoUnavailable: HYG12gV-xGE is unavailable


code that was used that resulted in the bug
https://youtu.be/HYG12gV-xGE?feature=shared

from pytubefix import YouTube

# put your code here

import sys
from pytubefix import YouTube
from pytubefix.cli import on_progress
# Arguments passed
url = sys.argv[1]
yt = YouTube(url, on_progress_callback = on_progress)
ys = yt.streams.get_highest_resolution()
ys.download()

__________
**Expected behavior**
A clear and concise description of what you expected to happen.
A succesfull download of the stream

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


__________
**Desktop (please complete the following information):**
 - OS: win10
 - Python Version [3.8.3]
 - Pytubefix Version [8.5.1]


__________
**Additional context**
Add any other context about the problem here.
@compujan66 compujan66 added the bug Something isn't working label Nov 21, 2024
@felipeucelli
Copy link
Contributor

The current pytubefix client does not support YouTube kids videos. Try changing the client to for example MWEB:

from pytubefix import YouTube
import sys
from pytubefix import YouTube
from pytubefix.cli import on_progress


url = sys.argv[1]
yt = YouTube(url, 'MWEB', on_progress_callback = on_progress)
ys = yt.streams.get_highest_resolution()
ys.download()

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
Development

No branches or pull requests

2 participants