fe80Grau / ytdlp2STRM

A little script to serve Youtube / Twitch / Crunchyroll videos without storage it. Uses yt-dlp HTTP data throught Flask and dynamic URLs. We can use this dynamic URLs to set STRM files.
https://github.com/fe80Grau/ytdlp2STRM
MIT License
173 stars 15 forks source link

'Youtube' object has no attribute 'channel_id' #19

Closed rassel9104 closed 7 months ago

rassel9104 commented 7 months ago

When manually executing "python3 cli.py --media youtube --params direct", I always receive the same error... Output in terminal:

 python3 cli.py --media youtube --params direct
09/11/2023 16:42:54
Running youtube with ['direct'] params
Preparing channel https://www.youtube.com/@CreativoenJapon
@CreativoenJapon
Working channel URL: https://www.youtube.com/@CreativoenJapon/videos
Getting channel ID...
Traceback (most recent call last):
  File "C:\ProgramData\ytdlp2STRM\cli.py", line 48, in <module>
    main()
  File "C:\ProgramData\ytdlp2STRM\cli.py", line 45, in main
    r = eval("{}.{}.{}".format("plugins",method,"to_strm"))(*params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\ytdlp2STRM\plugins\youtube\youtube.py", line 617, in to_strm
    channel_strm(
  File "C:\ProgramData\ytdlp2STRM\plugins\youtube\youtube.py", line 394, in channel_strm
    yt = Youtube(
         ^^^^^^^^
  File "C:\ProgramData\ytdlp2STRM\plugins\youtube\youtube.py", line 24, in __init__
    self.channel_id = self.get_id()
                      ^^^^^^^^^^^^^
  File "C:\ProgramData\ytdlp2STRM\plugins\youtube\youtube.py", line 76, in get_id
    if not self.channel_id:
           ^^^^^^^^^^^^^^^
AttributeError: 'Youtube' object has no attribute 'channel_id'. Did you mean: 'channel'?
fe80Grau commented 7 months ago

check the last commit, i predeclared channel_id but is it not normal... Also you can paste the output of tthis command here :

yt-dlp https://www.youtube.com/@CreativoenJapon --compat-options no-youtube-unavailable-videos --restrict-filenames --ignore-errors --no-warnings --playlist-items 1 --compat-options no-youtube-channel-redirect --print channel_url