diff --git a/README.md b/README.md index b5b5d20..a03fa2e 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,8 @@ Using the CLI: ``` youtube_transcript_api --http-proxy http://user:pass@domain:port --https-proxy https://user:pass@domain:port -``` +``` + ## Cookies Some videos are age restricted, so this module won't be able to access those videos without some sort of authentication. To do this, you will need to have access to the desired video in a browser. Then, you will need to download that pages cookies into a text file. You can use the Chrome extension [cookies.txt](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?hl=en) or the Firefox extension [cookies.txt](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/). @@ -223,10 +224,17 @@ Once you have that, you can use it with the module to access age-restricted vide ```python from youtube_transcript_api import YouTubeTranscriptApi -YouTubeTranscriptApi.get_transcript(video_id, cookies=) +YouTubeTranscriptApi.get_transcript(video_id, cookies='/path/to/your/cookies.txt') -YouTubeTranscriptApi.get_transcripts([video_id], cookies=) -``` +YouTubeTranscriptApi.get_transcripts([video_id], cookies='/path/to/your/cookies.txt') +``` + +Using the CLI: + +``` +youtube_transcript_api --cookies /path/to/your/cookies.txt +``` + ## Warning