JuanBindez / pytubefix

Python3 library for downloading YouTube Videos.
http://pytubefix.rtfd.io/
MIT License
454 stars 67 forks source link

Problematic Caracters #172

Closed JuanBindez closed 1 month ago

JuanBindez commented 1 month ago

Is your feature request related to a problem? Please describe.

Some operating systems do not accept downloading videos with titles that have special characters

Describe the solution you'd like

By adding the problematic_caracters method the user can pass as a parameter the character that needs to be removed from the title so that there is no problem with the OS.

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="?")

observation

pytubefix currently automatically removes some problematic characters such as ( /, :, *, ", <, >, |)