deepjyoti30 / ytmdl

A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
https://ytmdl.deepjyoti30.dev
MIT License
3.22k stars 164 forks source link

[Bug] Errors from missing videos in playlists don't seem to be handled gracefully. #288

Open deepjyoti30 opened 12 months ago

deepjyoti30 commented 12 months ago

Maybe it's a known issue, but errors from missing videos in playlists don't seem to be handled gracefully.

A playlist including, for example, this missing song https://music.youtube.com/watch?v=N_fGELxp10w fails and aborts with subsequent items in the playlist

Traceback (most recent call last):
  File "/home/user/.local/bin/ytmdl", line 8, in <module>
    sys.exit(entry())
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/main.py", line 614, in entry
    extract_data()
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/main.py", line 607, in extract_data
    main(args)
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/main.py", line 238, in main
    song_name, verify_name = extract_song_name(args)
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/main.py", line 530, in extract_song_name
    song_name, verify_title = yt.get_title(args.url, args.ytdl_config)
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/yt.py", line 409, in get_title
    title = __get_title_from_yt(url, ytdl_config)
  File "/home/user/.local/lib/python3.10/site-packages/ytmdl/yt.py", line 368, in __get_title_from_yt
    return stringutils.remove_yt_words(data["title"])
TypeError: 'NoneType' object is not subscriptable

This is the case even with the following flags, --download-archive dl.txt --quiet --on-meta-error youtube --ignore-errors --nolocal It's also the case with the following flags included in the yt-dlp config --no-abort-on-error --ignore-errors

Originally posted by @Firerouge in https://github.com/deepjyoti30/ytmdl/discussions/255#discussioncomment-7742517