From 8aa13c7d35645c129bdaa268a188d97cf920a47c Mon Sep 17 00:00:00 2001 From: DiamondDrake Date: Mon, 8 Jan 2024 05:02:03 -0500 Subject: [PATCH] Add media_extractor cookie-file documentation (#30152) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/media_extractor.markdown | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/_integrations/media_extractor.markdown b/source/_integrations/media_extractor.markdown index 9a0952f9f30..2241c8d0236 100644 --- a/source/_integrations/media_extractor.markdown +++ b/source/_integrations/media_extractor.markdown @@ -76,3 +76,12 @@ This will download the file from the given URL. | `entity_id` | yes | Name(s) of entities to seek media on, e.g., `media_player.living_room_chromecast`. Defaults to all. | | `media_content_id` | no | The ID of the content to play. Platform dependent. | | `media_content_type` | no | The type of the content to play. Must be one of MUSIC, TVSHOW, VIDEO, EPISODE, CHANNEL or PLAYLIST MUSIC. | + +### Cookies + +Some supported video services provide a better experience when you are logged in. For example, if you use Twitch Turbo or are subscribed to a Twitch streamer, logging in prevents the video stream from showing an "An ad is currently playing. Come back after the break." message until the ad is over. Other examples are private or purchased YouTube videos which you can only watch while logged in. +You can add a Netscape format cookie file in the Home Assistant configuration directory. The cookie file will be loaded each time a stream is loaded: + +```config/media_extractor/cookies.txt``` + +To generate the cookie file, you can use a browser extension (like [Get Cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)). If you want to create one manually, follow this specification: [https://curl.se/rfc/cookie_spec.html](https://curl.se/rfc/cookie_spec.html).