JuanBindez / pytubefix

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

Implemented info function: #269

Closed JuanBindez closed 1 month ago

JuanBindez commented 1 month ago

to return system information including OS, Python version, and Pytubefix version. Updated docstring to highlight usage for debugging and environment validation.

>>> from pytubefix import info
>>> 
>>> print(info())
{'OS': {'linux'}, 'Python': {'3.11.6 (main, Apr 10 2024, 17:26:07) [GCC 13.2.0]'}, 'Pytubefix': {'7.3.1'}}
>>> 

to use only the pytubefix version

>>> from pytubefix import info
>>> 
>>> system_info = info()
>>> 
>>> print(f"Pytubefix Version: {system_info['Pytubefix']}")
Pytubefix Version: 7.3.1
>>> 

This helps us debug and gives developers the freedom to automate this data in their logs, for example which version of Pytubefix it was on when a certain problem occurred.