From 112124367897cf8bfa7fffacad86926de5c0e5cf Mon Sep 17 00:00:00 2001 From: Alex Shnitman Date: Mon, 20 Sep 2021 16:31:47 +0300 Subject: reword README text about cookie usage --- README.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0816f7a..32b4b33 100644 --- a/README.md +++ b/README.md @@ -28,35 +28,34 @@ services: volumes: - /path/to/downloads:/downloads ``` -### Cookies -In case you need to use cookies with this container: +## Configuration via environment variables -* Add the following to your docker-compose +Certain values can be set via environment variables, using the `-e` parameter on the docker command line, or the `environment:` section in docker-compose. -```yaml +* __DOWNLOAD_DIR__: path to where the downloads will be saved. Defaults to `/downloads` in the docker image, and `.` otherwise. +* __AUDIO_DOWNLOAD_DIR__: path to where audio-only downloads will be saved, if you wish to separate them from the video downloads. Defaults to the value of `DOWNLOAD_DIR`. +* __URL_PREFIX__: base path for the web server (for use when hosting behind a reverse proxy). Defaults to `/`. +* __OUTPUT_TEMPLATE__: the template for the filenames of the downloaded videos, formatted according to [this spec](https://github.com/yt-dlp/yt-dlp/blob/master/README.md#output-template). Defaults to `%(title)s.%(ext)s`. +* __YTDL_OPTIONS__: Additional options to pass to youtube-dl, in JSON format. [See available options here](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L176). They roughly correspond to command-line options, though some do not have exact equivalents here, for example `--recode-video` has to be specified via `postprocessors`. Also note that dashes are replaced with underscores. Example value: `{"sleep_interval":10}`. + +## Using browser cookies +In case you need to use your browser's cookies with MeTube, for example to download restricted or private videos: +* Add the following to your docker-compose.yml: + +```yaml volumes: - - /some/path/to/your/cookies:/app/cookies + - /path/to/cookies:/cookies environment: - - YTDL_OPTIONS={"cookiefile":"/app/cookies/cookies.txt"} + - YTDL_OPTIONS={"cookiefile":"/cookies/cookies.txt"} ``` -* Install in your browser an extension to extract Cookies +* Install in your browser an extension to extract cookies: * [Firefox](https://addons.mozilla.org/en-US/firefox/addon/export-cookies-txt/) * [Chrome](https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid) * Extract the cookies you need with the extension and rename the file `cookies.txt` -* Drop the file in the folder you configured in the docker-compose above +* Drop the file in the folder you configured in the docker-compose.yml above * Restart the container -## Configuration via environment variables - -Certain values can be set via environment variables, using the `-e` parameter on the docker command line, or the `environment:` section in docker-compose. - -* __DOWNLOAD_DIR__: path to where the downloads will be saved. Defaults to `/downloads` in the docker image, and `.` otherwise. -* __AUDIO_DOWNLOAD_DIR__: path to where audio-only downloads will be saved, if you wish to separate them from the video downloads. Defaults to the value of `DOWNLOAD_DIR`. -* __URL_PREFIX__: base path for the web server (for use when hosting behind a reverse proxy). Defaults to `/`. -* __OUTPUT_TEMPLATE__: the template for the filenames of the downloaded videos, formatted according to [this spec](https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template). Defaults to `%(title)s.%(ext)s`. -* __YTDL_OPTIONS__: Additional options to pass to youtube-dl, in JSON format. [See available options here](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L176). They roughly correspond to command-line options, though some do not have exact equivalents here, for example `--recode-video` has to be specified via `postprocessors`. Also note that dashes are replaced with underscores. Example value: `{"sleep_interval":10}`. - ## Chrome extension [Rpsl](https://github.com/rpsl) has created a Chrome extension that allows right-clicking a video and sending it to MeTube. You can install it from [Google Chrome Webstore](https://chrome.google.com/webstore/detail/metube-downloader/fbmkmdnlhacefjljljlbhkodfmfkijdh) or use developer mode and install [from sources](https://github.com/Rpsl/metube-browser-extension). -- cgit