Changelog

All notable changes are kept track of in this file for use in creating release notes.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.4.0 - 2025-01-06

BREAKING CHANGES. See Changed and Removed for details.

This Version Drops Python 3.8 Support

Added

  • API call fetch_channel_from_handle that fetches channel information using a channel handle instead of a channel id. (40470a9#diff-cbbc953-R394)

  • API util resolve_handle that gets a channel id from a channel’s handle. (40470a9#diff-cbbc953-R581)

  • Parameter oauth_token to AsyncYoutubeAPI to authenticate using an OAuth2 token. (b7a188d#diff-cbbc953-R33)

  • Parameter authorised to fetch_video() which prompts the return of AuthorisedYoutubeVideo over a YoutubeVideo. (032e817)

  • Exception NoAuth which raises when neither an API key nor OAuth token is passed to AsyncYoutubeAPI. (b7a188d#diff-3f857ff)

  • Exception NoSession which raises when performing an operation that needs an OAuth2Session instance when there isn’t one. (9cf6422)

  • Base Exception AuthException which is the base for authorisation related errors. (fedeb89#diff-3f857ff-R16)

  • Base Exception OAuth2Exception which is the base for OAuth2 related errors. (fedeb89#diff-3f857ff-R21)

  • Parameter max_items to all playlist item API calls. (90e1ad1)

  • Parameter use_oauth to AsyncYoutubeAPI to prefer authenticating with OAuth2 over using an API key. (7ae3f3e#diff-cbbc953-R32)

  • API call fetch_subscriptions and associated types that fetches the subscriptions a channel has. (53674e6, 48b0dd3)

  • Video categories (api call and associated types). (9d60ec3, 455ec21)

  • Exception InvalidToken which raises when the OAuth token is invalid. (9190f66)

  • AsyncYoutubeAPI class-method with_authorisation_code which allows initialising using an OAuth2 authorisation code. (079797a)

  • AsyncYoutubeAPI class-method with_oauth_flow_generator which automates the OAuth2 authorisation flow. (6aede33#diff-cbbc953-R69)

  • Util basic_html_page() that creates a html page for with_oauth_flow_generator() to display. (80857bb)

  • AsyncYoutubeAPI class-method generate_url_and_socket which returns an OAuth2 consent url and socket to be used with with_authcode_receiver after giving the user the consent url. (774a185#diff-cbbc953-R72)

  • AsyncYoutubeAPI class-method with_authcode_receiver which listens for an OAuth2 authentication code on the socket provided. (774a185#diff-cbbc953-R97)

  • API call fetch_youtube_regions that fetches regions listed by YouTube. (f39b0a5#diff-cbbc953-R951)

  • API call fetch_youtube_languages that fetches languages listed by YouTube. (f39b0a5#diff-cbbc953-R974)

  • Enums for class AuthorisedYoutubeVideo. (19944de)

  • Class OAuth2Session for managing the current OAuth2 session. (baa7b9d)

  • Function refresh_session which refreshes the OAuth2 token for a session. (4e210fd)

  • Checker function is_expired to class OAuth2Session. (3ce06f7)

  • podcast_status attribute to YoutubePlaylist and enum. (5c85d35)

  • Enum OAuth2Scope and implementations into AsyncYoutubeAPI.generate_url_and_socket(). (3bd435a)

  • Attribute has_paid_product_placement to class YoutubeVideo. (e012a58)

  • Attribute contains_synthetic_media to YoutubeVideo as a settable value when updating the instance. (10881c0#diff-7363042-R745)

  • API call update_video which can update metadata for a video. (4bfb5d1#cbbc953-R1250)

  • Class UseExisting and constant EXISTING for new update methods as an indicator to use the existing values. (4bfb5d1#diff-7363042-R2209)

  • Util use_existing which is used in update methods to determine if the existing value should be used. (4bfb5d1#diff-920c31e)

  • Update method to YoutubeVideo. (c2bbd8d)

  • Quota usage is now kept track of per session and is accessible via AsyncYoutubeAPI.quota_usage. (e8c42c8)

  • Etag attributes to classes of API calls. (d44b5a3, d2e3bcb)

  • Enum CaptionFormat as a list of caption track formats supported by YouTube. (7e912bc)

  • API method download_caption() to download captions if you are the owner of the captions. (af49fe6)

  • API method save_caption() to download and save captions if you are the owner of the captions. (482ff7c)

  • download() and save() API methods to VideoCaption. (0e3c0ea)

  • API method set_video_thumbnail() which uploads and sets thumbnails for a video. (ce864de)

  • set_thumbnnail() API method to AuthorisedYoutubeVideo. (b292720)

  • Util ensure_missing_keys(). See documentation for details. (088166f)

  • API call update_channel() which can update some metadata for a channel. (41c37d3)

  • Update method to YoutubeChannel. (2a4eb75)

  • Methods to set the banner image of a channel. (15d2e26)

  • Options to set the width of a YouTube channel banner. (58856d7)

  • Methods, classes and exceptions for watermarks. (9c9126b)

  • Alias of YoutubeChannel.custom_url: handle. (a5bcc67)

  • Methods and classes for metadata on custom playlist cover images. (554ec4d)

  • Parameter ignore_not_found to methods that can take multiple items. (4ae024c)

  • Methods to add items to playlists. (a307789)

  • Attribute resource_id to PlaylistItem. (a6becbd)

  • Update method for PlaylistItems. (99c854f)

  • Update method for Playlists. (ea250b6)

  • Method to specify OAuth token type. (5f53155)

  • Method to fetch playlists created by a channel. (f38d271)

  • Method to fetch playlists owned by an authenticated user. (ba2b44c)

  • Method to fetch the channel owned by an authenticated user. (0f34669)

  • Documentation: New homepage added to pypi links. (601e763)

  • Documentation: Changelog added to pypi links. (2f9663c)

  • Documentation: New logo added to README.md. (ab5bda2)

  • Documentation: Added readthedocs documentation. (too many commits to list)

  • Documentation: Added OAuth2 examples. (5dcbf3f, 890d8c7, ffdd5f1)

  • Documentation: Examples for setting video thumbnails, channel banners and watermarks. (62f6879)

Removed

  • Breaking: Python 3.8 support. (53c66cd)

Deprecated

  • censor_token in favour of censor_key. (a4c0258)

  • exclude in favor of ignore_not_found. (b68e1a6)

Fixed

  • Outdated use of old attribute banner_external_url in channel example. (2a0c7bd)

  • API keys in urls passed when after calling the api are always censored. (cbc1514)

  • Broken attributes of AuthorisedYoutubeVideo. (b7a188d#diff-7363042)

  • YoutubeChannel.likes_id returning an invalid ID. (90e1ad1#diff-7363042-L1420)

  • VideoStream and AudioStream raising errors when certain values weren’t set. (10881c0)

  • HTTPException raising its own error when error_data is None. (2b3b18a)

  • Getting file_name in AuthorisedYoutubeVideo failing as it is sometimes not set. (eacf5cb)

  • Documentation: Updated old instances of class names still in documentation. (e41fd3b)

  • Documentation: Formatting error in docstring for exceptions.APITimeout. (9ac4776)

  • Documentation: wrong term used in YoutubeBanner. (e4ca4c3)

Changed

  • Breaking: Renamed attribute _type to kind in filters.SearchFilter. (7a60e71)

  • Breaking: PlaylistItem.id is now the actual item ID and the video ID is now PlaylistItem.video_id. (d50d852)

  • AsyncYoutubeAPI can now raise NoAuth if no API key or OAuth token is provided. (b7a188d#diff-cbbc953-R47)

  • fetch_video() can now return a superclass of YoutubeVideo: AuthorisedYoutubeVideo. (b7a188d#diff-cbbc953-R334)

  • OAuth token is used if no API key is provided. (90e1ad1#diff-cbbc953-R92)

  • InvalidKey now inherits from the new class AuthException. (fedeb89#diff-3f857ff-R174)

  • YoutubeVideo attribute made_for_kids can now be None. (4bfb5d1#diff-7363042-L744)

  • extract_video_id supports all *.ytimg.com urls. (5cda291)

  • Documentation: __init__ docstring included in AsyncYoutubeAPI class. (3af95cd)

0.3.0 - 2024-10-12

BREAKING CHANGES. See Changed and Removed for details.

This Version Drops Python 3.7 Support

Added

Changed

Fixed

  • Documentation: Missing closing square bracket. (85678be)

Removed

  • Breaking: Python 3.7 support (7b8f9ed)

0.2.1 - 2024-02-13

BREAKING CHANGES. See Changed for details.

Added

  • Added exclude parameter to fetch_playlist_videos which allows excluding certain videos from a result. This is useful when certain videos in a playlist are not found and you just wan’t the available videos (878d5cb, 498ac9d)

Fixed

  • Fixed an unhanded enum type privacyStatusUnspecified being passed to the enum PrivacyStatus (56207bb)

  • Added proper types to *NotFound exceptions to reflect multiple requested items being not found since version 0.2.0 (b198ce1)

Changed

  • Breaking: Renamed AsyncYoutubeApi back to AsyncYoutubeAPI. I will try not to change it again to keep things consistant (2806395)

0.2.0.post2 - 2023-11-26

BREAKING CHANGES. See Changed for details.

Added

Changed

Fixed

  • Correction: Fixed outdated examples (36e25cd)

  • Correction: Updated examples in README.md (94ae2e3)

0.1.6 - 2023-09-13

Fixed

  • Chapter names no longer have a trailing set of brackets if they surrounded the timestamp (b22dcbe)

0.1.5 - 2023-08-07

Fixed

  • Fixed a bug where trailing spaces followed by trailing hyphens would not be stripped (c95fa11)

0.1.4 - 2023-07-20

Fixed

  • Fixed unintended behaviour where the id extractor functions would return the path of the url instead of None when passing an invalid url. (3374b96)

  • Fixed bad type hints for extract_video_id and extract_playlist_id: changed the type from str to Optional[str] (3374b96)

0.1.3 - 2023-07-18

Added

  • Added a list of test playlist urls to parse (417719c)

  • Added playlist id parsing (e5965da#diff-920c31e-R28)

  • Added chapter parsing with new VideoChapter class and other related helper functions (875c82d)

Changed

0.1.2 - 2023-06-17

Too old to list changes

0.1.1 - 2022-10-28

Too old to list changes

0.1.0 - 2022-05-26

Too old to list changes