XronTrix10 / Telegram-Leecher

A Pyrogram based Telegram Bot to Transfer Files / Folders to Telegram and Google Drive With Multi-Functionality Using Google Colaboratory
https://t.me/Colab_Leecher
GNU General Public License v3.0
256 stars 234 forks source link

Update ytdl.py #17

Closed kjeymax closed 6 months ago

kjeymax commented 6 months ago

ERROR:root:YTDL ERROR: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

The error message indicates a problem with attempting to convert a NoneType object to an integer. This usually occurs when the code anticipates a specific value to be available, but it's None, indicating that it hasn't been properly initialized or retrieved.

ydl_opts = {
    "format": "best",
    "allow_multiple_video_streams": True,
    "allow_multiple_audio_streams": True,
    "writethumbnail": True,
    "allow_playlist_files": True,
    "overwrites": True,
    "postprocessors": [{"key": "FFmpegVideoConvertor", "preferedformat": "mp4"}],
    "progress_hooks": [my_hook],
    "writesubtitles": "srt",  # Enable subtitles download
    "extractor_args": {"subtitlesformat": "srt"},  # Extract subtitles in SRT format
    "logger": MyLogger(),

I added a subtitle extractor feature and fixed the m3u8 file download problem and file upload errors.

XronTrix10 commented 6 months ago

Thank You for pointing out the potential issues with the code. I highly appreciate your work and more over your contribution. I am merging this pr., But can you also look into the issue #5 ? That one is also a big issue

kjeymax commented 6 months ago

5 Yes. I solved that problem. Check it out.

XronTrix10 commented 6 months ago

5 Yes. I solved that problem. Check it out.

Alright man.