Skip to content

Commit 2f05771

Browse files
committed
updated youtube_download_video.sh
1 parent e031264 commit 2f05771

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: media/youtube_download_video.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ If you run into this error:
3838
3939
ERROR: [youtube] ...: Sign in to confirm you’re not a bot.
4040
41-
Then you should provide a filename and then after it args to pass to yt-dlp such as
41+
Then set this in your shell first with the name of your browser:
4242
43-
--cookies-from-browser chrome
43+
export YT_DLP_COOKIES_FROM_BROWSER=chrome
4444
4545
Try to upgrade yt-dlp first as sites like YouTube update their site breaking this and requiring a yt-dlp update
4646
"
@@ -105,6 +105,7 @@ yt-dlp \
105105
--retries 50 \
106106
--output "$output_filename" \
107107
${DEBUG:+--verbose} \
108+
${YT_DLP_COOKIES_FROM_BROWSER:+--cookies-from-browser "$YT_DLP_COOKIES_FROM_BROWSER"} \
108109
"$@" \
109110
"$url"
110111

@@ -125,6 +126,7 @@ else
125126
yt-dlp --get-filename \
126127
--format "$format" \
127128
--output "$output_filename" \
129+
${YT_DLP_COOKIES_FROM_BROWSER:+--cookies-from-browser "$YT_DLP_COOKIES_FROM_BROWSER"} \
128130
"$@" \
129131
"$url"
130132
)"

0 commit comments

Comments
 (0)