Skip to content

Commit c7fbfd5

Browse files
committed
- Fix consent cookie.
Related: yt-dlp/yt-dlp#7774
1 parent 361b23c commit c7fbfd5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/WWW/PipeViewer.pm

+5
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ sub set_lwp_useragent {
388388
"/", ".youtube.com", undef, 0, 1, "17" . join('', map { int(rand(10)) } 1 .. 8),
389389
0, {});
390390

391+
my $rand_value = '17' . join('', map { int(rand(10)) } 1 .. 8);
392+
393+
$cookies->set_cookie(0, "SOCS", "CAISNQgCEitib3FfaWRlbnRpdHlmcm9udGVuZHVpc2VydmVyXzIwMjMxMDEwLjAyX3AxGgJ1cyABEgUIYKOy0wU=",
394+
"/", ".youtube.com", undef, 0, 1, $rand_value, 0, {});
395+
391396
$agent->cookie_jar($cookies);
392397
}
393398

0 commit comments

Comments
 (0)