-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Download fails for video titles with '?' character #265
Comments
try: from pytubefix import YouTube
from pytubefix.cli import on_progress
url = "url"
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)
ys = yt.streams.get_audio_only()
ys.download(mp3=True, remove_problematic_character="?") |
It's not a problem with the library, but rather with your operating system, which isn't accepting writing "?" when saving |
Not a Bug. Suggestions:
Solution: The PyTube library provides helpers to create OS safe file names: https://pytube.io/en/latest/api.html#stream-object
The Modify your code to use one or the other. |
❗ DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE ❗
lack of information will lead to closure of the issue
Describe the bug
I am trying to download wav audio files of songs given album links. It seems that pytube failes specifically for songs with question mark character in the title. Out of 1425 songs, only 15 fails, and all of them are with question mark character in the video title.
code that was used that resulted in the bug
Expected behavior
I expected that the all files download without any failures.
Screenshots
pytubefix_output.txt
Desktop (please complete the following information):
Additional context
Might it have anything to do with regex?
The text was updated successfully, but these errors were encountered: