youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

Youtube Channel profile picture download feature request. (--profile-picture)

Open angentanewbe opened this issue 3 years ago • 8 comments

  • [x] I'm reporting a feature request
  • [x] I've verified that I'm running youtube-dl version 2021.03.14
  • [x] I've searched the bugtracker for similar feature requests including closed ones

Description

Hi I am requesting a feature to download the profile pictures of Youtube channels. Although I know a way to download by just changing some values out of the profile link maybe you can program it in the youtube-dl for automation.

first open up a youtube channel for eg https://www.youtube.com/channel/UCNeOeCvRK0pDv3kKZj6xUFQ

now right click on profile picture and view it (In Firefox browser)

now you get a link in the opened tab https://yt3.ggpht.com/ytc/AAUvwniM79AKFrUQMLOgCRRRhESud3DikoGd3tbuAwQi=s88-c-k-c0x00ffffff-no-rj

by changing the value s88 to s1024 we get the full view of the profile picture

here is the edited link https://yt3.ggpht.com/ytc/AAUvwniM79AKFrUQMLOgCRRRhESud3DikoGd3tbuAwQi=s1024-c-k-c0x00ffffff-no-rj

you can automate the process and add the feature to youtube-dl. Use --profile-picture as the argument to be used for the extraction of image through youtube-dl.

Also some other suggestions for argument instead of --profile-picture --user-picture --picture --profile-photo --pp --photo

angentanewbe avatar Mar 15 '21 11:03 angentanewbe

I found this issue and would love to contribute!

sbiviji avatar Apr 08 '21 01:04 sbiviji

I had some questions while working on this. Is there a forum where I can talk with other developers about the issues I'm facing?

sbiviji avatar Apr 21 '21 18:04 sbiviji

@angentanewbe @sbiviji - I'm aware this has been open for some time now, but placing here for posterity. You can autonomously download the original un-cropped profile pictures of a youtube channel with this command yt-dlp.exe "https://www.youtube.com/@{channel}" --write-thumbnail --playlist-items 0

Or, download every single avatar/profile picture size, and banner sizes, posted to the channel using yt-dlp.exe "https://www.youtube.com/@{channel}" --write-all-thumbnails --playlist-items 0

Hopefully this helps some users looking to automate downloading the avatars and banners of youtube channels.

Original issue discussing this problem here: https://github.com/yt-dlp/yt-dlp/issues/1111

KJBurnett avatar Dec 08 '22 03:12 KJBurnett

@KJBurnett Is there a way to make this work on channels that still don't have any videos? I'm getting this error:

[youtube:tab] <channel URL>: Downloading webpage  
ERROR: [youtube:tab] <channel URL>: This channel has no uploads

daniel-pg avatar Jan 21 '23 07:01 daniel-pg

The channel thumbnail should be supported with the next YT extractor back-port/update

dirkf avatar Dec 11 '23 16:12 dirkf

Is there a way to print the url of the thumbnail to the terminal as against downloading it as a file? yt-dlp <channel URL> --print "%(thumbnail)s" --skip-download --playlist-items 0 has no output, and yt-dlp <channel URL> --print "%(thumbnail)s" --skip-download --playlist-items 1 does the most recent video thumbnail.

LiquidZulu avatar Jun 28 '24 13:06 LiquidZulu

#30839 ... if you were actually using yt-dlp ...

Probably, the channel thumbnail is not present or not called thumbnail. See answer [1] below.

However, the same question applies to yt-dl too, with a slightly different answer at [2].

  1. Output JSON and select the desired value using a JSON tool like jq.

  2. Since yt-dl doesn't have --print, use --get-filename --output "%(thumbnail)s", where thumbnail is the name of the item to be printed, but be aware that the value displayed will have been sanitised to be used as a filename.

dirkf avatar Jun 28 '24 15:06 dirkf

oh, derp, didn't notice the repo name lol. Ty

LiquidZulu avatar Jun 29 '24 16:06 LiquidZulu