JuanBindez / pytubefix

Python3 library for downloading YouTube Videos.
https://pytubefix.readthedocs.io
MIT License
722 stars 100 forks source link

pytubefix don't work as expected #245

Closed ATPDS closed 1 month ago

ATPDS commented 1 month ago

:exclamation: DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE :exclamation:

lack of information will lead to closure of the issue


Describe the bug when launch the pytubefix don't get the video but it still get the title

Titan TR Digital 30 PETD3091000H CreativeX sm Traceback (most recent call last): File "/home/tul/Desktop/project/ILI9341/yt.py", line 10, in ys = yt.streams.get_highest_resolution() File "/home/tul/.local/lib/python3.11/site-packages/pytubefix/main.py", line 629, in streams self.check_availability() File "/home/tul/.local/lib/python3.11/site-packages/pytubefix/main.py", line 335, in check_availability raise exceptions.VideoUnavailable(video_id=self.video_id) pytubefix.exceptions.VideoUnavailable: DFI51983fvw is unavailable


code that was used that resulted in the bug

from pytubefix import YouTube
from pytubefix.cli import on_progress
url = 'https://www.youtube.com/watch?v=DFI51983fvw'
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)
ys = yt.streams.get_highest_resolution()
ys.download()

Expected behavior Download the video


Desktop (please complete the following information):


JuanBindez commented 1 month ago

Try pytubefix==7.0rc1

Em qua., 25 de set. de 2024 00:54, ATPDS @.***> escreveu:

❗ DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE ❗

lack of information will lead to closure of the issue

Describe the bug when launch the pytubefix don't get the video but it still get the title

Titan TR Digital 30 PETD3091000H CreativeX sm Traceback (most recent call last): File "/home/tul/Desktop/project/ILI9341/yt.py", line 10, in ys = yt.streams.get_highest_resolution() File "/home/tul/.local/lib/python3.11/site-packages/pytubefix/main.py", line 629, in streams self.check_availability() File "/home/tul/.local/lib/python3.11/site-packages/pytubefix/main.py", line 335, in check_availability raise exceptions.VideoUnavailable(video_id=self.video_id) pytubefix.exceptions.VideoUnavailable: �[91mDFI51983fvw is unavailable�[0m

code that was used that resulted in the bug

from pytubefix import YouTubefrom pytubefix.cli import on_progressurl = 'https://www.youtube.com/watch?v=DFI51983fvw'yt = YouTube(url, on_progress_callback = on_progress)print(yt.title)ys = yt.streams.get_highest_resolution()ys.download()


Expected behavior Download the video

Desktop (please complete the following information):

  • OS: [Debian GNU/Linux 12 (bookworm)]
  • Python Version [3.11.2]
  • Pytubefix Version [6.17.0]

— Reply to this email directly, view it on GitHub https://github.com/JuanBindez/pytubefix/issues/245, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS5FZ6VBTCSGZHSOGVSKAZ3ZYIXVZAVCNFSM6AAAAABOZTG22CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DMOBTG44DQNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ATPDS commented 1 month ago

Thank you. that work for me!