Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show yt-dlp logs by default #992

Open
TheSpyder opened this issue May 22, 2024 · 2 comments
Open

Show yt-dlp logs by default #992

TheSpyder opened this issue May 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@TheSpyder
Copy link

TheSpyder commented May 22, 2024

I've busted something in my docker setup and some containers have 100% network failure. I'm not asking for help with that, I found a way to fix the network connection, but I think ytdl-sub should handle the situation better. The logs have no indication of such a critical failure and it took a day or two before I noticed I wasn't getting any new videos.

At the default log level everything appeared mostly normal. The only indication something might be wrong in the logs was that a few channels had expiring videos, and every run listed -1 or -2 for those channels without actually deleting anything. Then I realised the total was showing +9 every run without any downloads - and that + was equal to the number of expired videos.

Only after I increased the log level did it show the real issue:

[ytdl-sub] Validating subscriptions...
[ytdl-sub:subscription] Filtering subscriptions by name based on --match arguments
[ytdl-sub] Beginning subscription download for Skill Up
[ytdl-sub:yt-dlp] [youtube:tab] Extracting URL: https://www.youtube.com/@SkillUp/videos
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading webpage
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937d25a0>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (1/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading webpage
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937d13d0>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (2/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading webpage
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937d3560>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (3/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading webpage
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] Unable to download webpage: <urllib3.connection.HTTPSConnection object at 0x7f937c8e00>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again) (caused by TransportError("<urllib3.connection.HTTPSConnection object at 0x7f937c8e00>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again)")). Giving up after 3 retries
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading API parameters API JSON
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937d1430>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (1/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading API parameters API JSON
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937c9be0>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (2/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading API parameters API JSON
[ytdl-sub:yt-dlp] WARNING: [youtube:tab] <urllib3.connection.HTTPSConnection object at 0x7f937d3230>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again). Retrying (3/3)...
[ytdl-sub:yt-dlp] [youtube:tab] @SkillUp/videos: Downloading API parameters API JSON
[ytdl-sub:yt-dlp] ERROR: [youtube:tab] @SkillUp: Unable to download API page: <urllib3.connection.HTTPSConnection object at 0x7f937ca540>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again) (caused by TransportError("<urllib3.connection.HTTPSConnection object at 0x7f937ca540>: Failed to resolve 'www.youtube.com' ([Errno -3] Try again)"))
[ytdl-sub:downloader] Beginning downloads for https://www.youtube.com/@SkillUp/videos
[ytdl-sub] 
No files changed for Skill Up
[ytdl-sub] Download Summary:
Skill Up     0 0 0     30 ✔
Total: 1     0 0 0     30 Success

I suggest having a more critical error when there are network failures :)

I'm running ghcr.io/jmbannon/ytdl-sub:latest and the current image (it actually started after a docker pull, so initially I wondered if it was a ytdl-sub bug).

Replicating is easy - with a running container do docker network disconnect <container-network> <container-name>.

@TheSpyder
Copy link
Author

After looking at the logs some more, I realise that it's apparently normal for the total expired videos to be a + in the totals row. So that part was normal, it's just that nothing was actually deleted due to the download error.

@jmbannon
Copy link
Owner

Maybe I'll make --log-level verbose the default, which shows yt-dlp logs and not by debug logs. Thanks for the suggestion @TheSpyder 🙂

@jmbannon jmbannon added the enhancement New feature or request label May 29, 2024
@jmbannon jmbannon changed the title Failure to connect to youtube doesn't show in default log level Show yt-dlp logs by default May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants