Closed h33k closed 1 month ago
in version 6.2.2, problematic characters were removed https://github.com/JuanBindez/pytubefix/commit/b2ac8550da2b73421bde43838b96d7cace979c29 , what we can do is add the "?" in the list this already solves the problem, in the next releases we will test this.
I need you to do a test, use pip install pytubefix==6.10a3 and try the code that I will give you as an example, instead of updating the table I added a method so that the user who has problems with characters can remove the character, because not all OS will have problems with the same characters
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_chars="?")
works perfect. I use win11 btw
Hello. I noticed that it is impossible to download videos with a question mark ("?") in the video title. I'm not sure about others special characters.
Error
OSError: [Errno 22] Invalid argument: "C:\\question mark?.mp3"
Quick fix Add
filename = filename.replace('?','')
in the streams.py (~314 line) before