youtube-unofficial¶
Access parts of your account unavailable through normal YouTube API access.
Commands¶
youtube¶
Unofficial YouTube CLI.
Usage
youtube [OPTIONS] COMMAND [ARGS]...
clear-watch-history¶
Clear watch history.
Usage
youtube clear-watch-history [OPTIONS]
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
clear-watch-later¶
Clear watch later queue.
Usage
youtube clear-watch-later [OPTIONS]
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
print-history¶
Print your watch history.
By default, this will print the video IDs of your watch history.
If -j/–json is specified, this will print a JSON object for each video in your watch history. The JSON object will have the following interface:
{
channel_thumbnails: {
height: int
width: int
url: string
}[]
description: string
length: string
length_accessible: string
long_byline_text: string
moving_thumbnails: {
height: int
width: int
url: string
}[]
owner_text: string
short_byline_text: string
short_view_count_text: string
title: string
video_id: string
video_thumbnails: {
height: int
width: int
url: string
}[]
}
Usage
youtube print-history [OPTIONS]
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
- -j, --json¶
Output in JSON format.
print-playlist¶
Print a playlist.
By default, this will print the video IDs of the given playlist ID.
If -j/–json is specified, this will print a JSON object for each video in your Watch Later playlist. The JSON object will have the following interface:
{
owner: string
title: string
video_id: string
watch_url: string
}
Usage
youtube print-playlist [OPTIONS] PLAYLIST_ID
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
- -j, --json¶
Output in JSON format.
Arguments
- PLAYLIST_ID¶
Required argument
print-watch-later¶
Print your Watch Later playlist.
By default, this will print the video IDs of your Watch Later playlist.
If -j/–json is specified, this will print a JSON object for each video in your Watch Later playlist. The JSON object will have the following interface:
{
owner: string
title: string
video_id: string
watch_url: string
}
Usage
youtube print-watch-later [OPTIONS]
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
- -j, --json¶
Output in JSON format.
remove-history-entries¶
Remove videos from Watch History.
Usage
youtube remove-history-entries [OPTIONS] [VIDEO_IDS]...
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
Arguments
- VIDEO_IDS¶
Optional argument(s)
remove-video-id¶
Remove videos from a playlist.
Usage
youtube remove-video-id [OPTIONS] PLAYLIST_ID [VIDEO_IDS]...
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
Arguments
- PLAYLIST_ID¶
Required argument
- VIDEO_IDS¶
Optional argument(s)
remove-watch-later-video-id¶
Remove videos from your Watch Later queue.
Usage
youtube remove-watch-later-video-id [OPTIONS] [VIDEO_IDS]...
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
Arguments
- VIDEO_IDS¶
Optional argument(s)
toggle-watch-history¶
Disable or enable watch history.
Usage
youtube toggle-watch-history [OPTIONS]
Options
- -d, --debug¶
Enable debug output.
- -b, --browser <browser>¶
Browser to read cookies from.
- -p, --profile <profile>¶
Browser profile.
Contents:
- Client
- Constants
- youtube_unofficial.constants.HISTORY_ENTRY_KEYS_TO_SKIP
- youtube_unofficial.constants.SIMPLE_TEXT_KEYS
- youtube_unofficial.constants.TEXT_RUNS_KEYS
- youtube_unofficial.constants.THUMBNAILS_KEYS
- youtube_unofficial.constants.USER_AGENT
- youtube_unofficial.constants.WATCH_HISTORY_URL
- youtube_unofficial.constants.WATCH_LATER_URL
- Typing
- youtube_unofficial.typing.history.HistoryVideoIDsEntry
- youtube_unofficial.typing.playlist.HasKeyText
- youtube_unofficial.typing.playlist.Icon
- youtube_unofficial.typing.playlist.NavigationEndpoint
- youtube_unofficial.typing.playlist.NextContinuation
- youtube_unofficial.typing.playlist.PlaylistInfo
- youtube_unofficial.typing.playlist.PlaylistVideoIDsEntry
- youtube_unofficial.typing.playlist.PlaylistVideoListRenderer
- youtube_unofficial.typing.playlist.PlaylistVideoListRendererContinuations
- youtube_unofficial.typing.playlist.PlaylistVideoRenderer
- youtube_unofficial.typing.playlist.PlaylistVideoRendererMenu
- youtube_unofficial.typing.playlist.PlaylistVideoRendererMenuRenderer
- youtube_unofficial.typing.playlist.PlaylistVideoRendererMenuRendererItem
- youtube_unofficial.typing.playlist.PlaylistVideoRendererMenuRendererItemMenuServiceItemRenderer
- youtube_unofficial.typing.playlist.RunsOrSimpleText
- youtube_unofficial.typing.playlist.RunsOrText
- youtube_unofficial.typing.playlist.WatchEndpoint
- youtube_unofficial.typing.ytcfg.YtcfgDict